Comments (9)
Generally for memory inference to work you want something like:
reg [DWIDTH-1:0] ram[0:MEM_SIZE-1];
from circt.
@lattner I think option 2 is most intuitive.
from circt.
It could be good to bring this up on the forum to see if others have an opinion, it would also be worth looking at what LLHD is doing here.
from circt.
Interesting, is the 'packed vs unpacked' distinction just simulator performance, or is there something else going on here?
It seems like there are a couple of ways we could model this:
- we could model this with a list of dimensions, then a "number of packed dimensions" integer in the type.
- we could model this as a single "packed vector" and "unpacked vector" type that compose onto each other.
I think the major distinction should be how these compose with non-bit types like the SystemVerilog bundle types.
from circt.
Something to keep in mind when generating arrays b/c Verilator is the most used open source simulator.
from circt.
4D array
// 2 1 3 4
logic [1:5] [7:0] v4 [1:7] [1:8];
1,2 = packed dimensions - guaranteed to be represented as a contiguous set of bits.
3,4 = unpacked dimentions - can be resized (grow, shrink)
1 varies most rapidly, followed by 2,3,4
from circt.
All N packed dimensions have to compose first before to compose with M unpacked dimensions.
Could we make sure that packed type can compose into primitive or packed type only, while unpacked can compose into primitive, packed or unpacked.
from circt.
I'm not sure if we ended up discussing this in one of the meetings, but I'm planning on adding a tensor type to the RTL dialect. I welcome additional input!
from circt.
We now have ArrayType (packed) and UnpackedArrayType, I think this is done.
from circt.
Related Issues (20)
- [CI] LLVM Rebuild configuration suddenly broken? HOT 2
- [Arc] Add basic assertion support HOT 15
- [FIRRTL] Add back owning module constraint for local targets after removing use of ExtractInstances
- [HGLDD] Emit HW struct and array types
- Wiring problem error with const source and non-const sink w/no-ref-type option
- [FIRRTL][CheckCombLoops] Missing RWProbeOp support, crashes HOT 1
- [FIRRTL] LowerMemory change in #6719 leads to ambiguous targets in EmitOMIR HOT 3
- [Comb] Missed optimization opportunity for multiply used boolean operations
- [SV] SVExtractTestCode not Extracting Assert Properties
- [OM] parsing depend on the ordering of Class HOT 5
- [firrtl] extmodules with HasBlackBoxInline instantiated only in a layer not emitted into layers location
- [SMT] Add quantifier attribute and pattern support to ExportSMTLIB HOT 1
- [FIRRTL] Not generate "automatic logic" in the output SystemVerilog file HOT 2
- [FIRRTL] ‘firtool’ crashes with an error when receives a ‘fir’ file with no main module HOT 3
- [FIRRTL][InferWidths] When there is no unique minimal solution for width constraints, what should be the width? HOT 9
- Looking for circt==1.48.1.dev34 HOT 1
- [FIRRTL] isX lowering doesn't work for bundles HOT 2
- [FIRRTL] sizeof intrinsic doesn't work on bundles HOT 1
- Duplicate expressions possibly due to spilled event control expressions in LTL statements
- [comb] Break out some canonicalizations into optimization pass
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.