Comments (7)
@drom is looking into this
from circt.
About firrtl.shl(x, 4) ==> {x, 4'h0}
convertion
FIRRTL
Has two kinds of shift operations:
Static:
Dynamic:
VerilogRTL
Has shift operators:
- logical shift operators,
<<
and>>
- arithmetic shift operators,
<<<
and>>>
Should we have them in the RTL Dialect?
from circt.
About firrtl.cvt
FIRRTL
Verilog RTL
Should we have $signed
operation type in RTL Dialect?
from circt.
Yeah, it is a good question about whether we have signed or unsigned types in RTL dialect. It doesn't really make sense for a hardware oriented dialect to do that, but given the importance of Verilog in practice, it might make sense.
For now, lets stick with signless types. If it becomes a problem in practice we can always revise this.
from circt.
Also xref for general background (not saying this is the right thing to do here necessarily): https://mlir.llvm.org/docs/Rationale/Rationale/#integer-signedness-semantics
from circt.
Vivado HLS uses LLVM-style signless types for most of the compiler. This causes some subtleties in range analysis which tracks a signed range and an unsigned range for each value. In RTL, signed operations are typically represented like:
wire [8:0] add_ln235_fu_662_p2;
reg [8:0] j_0_reg_360;
assign add_ln235_1_fu_687_p2 = ($signed(9'd482) + $signed(j_0_reg_360));
(In other words, most everything is declared as vectors of bits and signed operations are expressed by always converting the operands to signed. There are a few places where wires are declared as signed, but this is the exception more than the rule.)
from circt.
I think this is complete now!
from circt.
Related Issues (20)
- [FIRRTL] FART: Should not modify public module ports
- [SV] Add option to generate ram blocks without x assigns HOT 1
- [ESI] Add value validation to Channels and Bundles
- [FIRRTL] Inconsistency when compiling two semantically equivalent fir code HOT 2
- Main link on GH broken (circt.org rather than https://circt.llvm.org/) HOT 1
- Perf measurements link (https://circt.org/perf/) broken HOT 1
- [FIRRTL] Replace "noRefTypePorts" with Pass
- [README] what does "IR" stand for? HOT 1
- [FIRRTL] Feature Request: Have dedup report all errors, not just the first HOT 1
- [FIRRTL] Crash in LowerClasses related to StringMap buckets HOT 1
- [FIRRTL] Investigate LowerClasses namespace lifetimes
- [firtool] Not parsing enable/disable layers CLI option properly
- [LowerToHW] Crash involving `TestBenchDirAnnotation` HOT 1
- [FIRRTL] Incorrect Output Directory for Multiply Instantiate Module in Layer
- [FIRRTL] Canonicalization missing for narrow dynamic subindex
- [FIRRTL][LowerLayers] Cannot send rwprobe out of layer HOT 2
- [FIRRTL][Inliner][InstChoice] Basic example doesn't work
- [FIRRTL] Fix use of layer-enabled rwprobe's with force, force_initial HOT 1
- [Seq] Round tripping seq.clock fails
- [HW] Roundtrip test fail for !hw.union
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 circt.