You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please provide the steps to reproduce the problem:
Using the latest chisel-template (corresponding to chisel v6.0.0), emit the following code as System Verilog, and compare the Chisel source code with the resulting System Verilog code.
What is the current behavior?
"We observe that in the original code, we explicitly require the value of reg to be true when the reset signal is true. However, in the resulting System Verilog code, the value of the reg signal is false when the reset signal is true.
What is the expected behavior?
The reset behavior of the compiled System Verilog code is consistent with the Chisel source code. If this is my misuse, please tell me how to write a reg that is initially false and then remains true. Thank you.
Please tell us about your environment:
Chisel version: v6.0.0
OS: Ubuntu 24.04 LTS
Other Information
What is the use case for changing the behavior?
mentioned before
The text was updated successfully, but these errors were encountered:
The reason for the behavior is that val reg = RegInit(false.B) means reset the register to false (0), this overrides the when (reset.asBool).
I think perhaps the confusion stems from the use of the term "initially false". By "initialization" Chisel means at reset. RegInit means "reset the register to the given value. Reading your issue, I am assuming you mean initialization in the sense of a System Verilog initial block. Chisel is intended for writing reusable generators for synthesizable, synchronous, digital designs. While we recognize that some FPGA tools synthesize initial blocks, not all do, and more importantly, ASIC tools do not. Therefore, Chisel does not support specifying System Verilog initial values for registers (or anything).
linmoIO
changed the title
"Regarding the loss of active reset behavior of Reg or being overridden by RegInit.
Regarding the loss of active reset behavior of Reg or being overridden by RegInit.
Dec 19, 2024
Type of issue: Bug Report
Please provide the steps to reproduce the problem:
Using the latest chisel-template (corresponding to chisel v6.0.0), emit the following code as System Verilog, and compare the Chisel source code with the resulting System Verilog code.
"The resulting System Verilog code:
What is the current behavior?
"We observe that in the original code, we explicitly require the value of reg to be true when the reset signal is true. However, in the resulting System Verilog code, the value of the reg signal is false when the reset signal is true.
What is the expected behavior?
The reset behavior of the compiled System Verilog code is consistent with the Chisel source code. If this is my misuse, please tell me how to write a reg that is initially false and then remains true. Thank you.
Please tell us about your environment:
Chisel version: v6.0.0
OS: Ubuntu 24.04 LTS
Other Information
What is the use case for changing the behavior?
mentioned before
The text was updated successfully, but these errors were encountered: