Comments (8)
Fixed with llvm/circt#6966 , tested the GCD example fails the assertion before and does not after.
This should work when bumping Chisel to use the next CIRCT release including that change.
from chisel.
Nice find, and thanks for working with the Verilator folks on getting this tracked down.
I think few people are using SInt in Chisel. But it should be correct.
Yes, I expect low impact as SInt
has very limited use. We'll get this fixed.
from chisel.
BTW, why does Chisel/CIRCT adds an extra sign bit when converting UInt to SInt? It seems without this extra sign bit, the conversion still holds.
from chisel.
@seldridge Hi, do you have a timeline when this bug will be fixed? Thanks
from chisel.
Sorry, I forgot about this. I reduced this just now to: llvm/circt#6961
@dtzSiFive identified that there was a very similar bug related to arithmetic shift right which was fixed by adding the EBForceResultSigned
binary flag. This same approach should work for division here. See: llvm/circt@31070d0
I'll try to get a fix in this week. If you're so motivated to send a patch earlier, that is always appreciated.
from chisel.
Thank you very much on working this. Unluckily we still don't have enough human resources on understanding the circt. Personally I've tried my best to learn Chisel/CIRCT, but it seems the complexity of CIRCT makes me struggling. Hopefully next time I can submit a patch to CIRCT myself.
from chisel.
Fixed with llvm/circt#6966 , tested the GCD example fails the assertion before and does not after.
This should work when bumping Chisel to use the next CIRCT release including that change.
Thanks very much for all of you. We're continuously tracking the latest Chisel.
I'm closing this issue now. Please feel free to open this again if there're still issues to be cleared.
from chisel.
For completeness, the output of the erroneous example will now produce:
// Generated by CIRCT firtool-1.73.0-56-g3ef492c80-dirty
module Test1(
input clock,
reset,
input [15:0] io_in0,
io_in1,
io_in2,
output [15:0] io_result
);
reg [16:0] result;
always @(posedge clock)
result <= {1'h0, io_in0} + $signed($signed({io_in1[15], io_in1}) / $signed({io_in2[15], io_in2}));
assign io_result = result[15:0];
endmodule
from chisel.
Related Issues (20)
- ChiselSim improvements to close the gap to chiseltest
- Incorrect direction for mixed specified and unspecified directionality
- ChiselSim tests runs orders of magnitude slower than chiseltest HOT 4
- [ChiselSim] ChiselEnum does not provide peek/poke methods and user-friendly API HOT 4
- Module initialization test fails with ChiselSim while worked on chiseltest
- Chisel chokes on using elements of an unbound Aggregate as elements of a Record HOT 2
- Bulk connection emission for <> fails for "input" wires
- asUInt packing inconsistent for Bundles with type parameters HOT 5
- Please make some classes in simulator package public for simulator customization.
- ChiselSim waveforms HOT 4
- API for specifying customized transforms in ChiselStage (and dependencies?) HOT 1
- SVSim fails when pokeing and incrementing clock in loop
- Proposal for Verification IR with reset HOT 2
- Firtool error occurs when looking up parameters from a definition of a Module with reset HOT 1
- Scala version HOT 2
- Missing layer definitions when using Definition and Instance HOT 1
- UInt<1>(0)' must be a Chisel type, not hardware HOT 2
- How to access chisel-generated modules using SystemVerilog interface
- How to get the current simulated clock time? HOT 3
- Wrong memory initialization with ChiselSim HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chisel.