Comments (5)
Hi,
$clog2()
should be supported; it sounds to me like you are using the wrong language standard. Are you sure you are reading the RTL as SystemVerilog? Also, make sure your tool is up to date; we require SV 2017 (1800-2017) in various places.
from snitch.
Hi,
$clog2()
should be supported; it sounds to me like you are using the wrong language standard. Are you sure you are reading the RTL as SystemVerilog? Also, make sure your tool is up to date; we require SV 2017 (1800-2017) in various places.
Hi~
Of course $clog2() is synthesizable. But the arguement of $clog2 shall be constant.
function automatic integer unsigned idx_width (input integer unsigned num_idx);
return (num_idx > 32'd1) ? unsigned'($clog2(num_idx)) : 32'd1;
endfunction
However, the function idx_width input is integer unsigned(this is not const) and it is used directly in $clog2.
Eventhough the real argument of idx_width is const, the synthesis tool(=design-compiler) interpret the argument of $clog2 is variable.
It's not a constant from a language point of view
ps. Please re-open this issue. Current version is not synthesizable.
commit 989a0bc3987d83ef077b51e5b9a1adfc42f3cde7
Author: GiannaP <[email protected]>
Date: Mon Mar 14 14:16:06 2022 +0100
from snitch.
Hi,
Current version is not synthesizable
Wrong. We can only directly support you in the use of FOSS tools with our RTL, but I can assure you that the RTL in this exact commit is fully synthesizable. I suggest you carefully consult your tool's documentation for the error you encountered.
It's not a constant from a language point of view
Wrong. According to 1800-2017, all math functions (including $clog2()
) may be used in constant expressions, constant expressions may be used in constant functions, and idx_width()
fulfills all other criteria of a constant function. So unless idx_width()
is called with non-constant parameters (in which case you should provide a call site), this should not be an issue.
Either way, this remains closed as we do not intend to discuss the use of non-free tools.
from snitch.
Wrong. According to 1800-2017, all math functions (including
$clog2()
) may be used in constant expressions, constant expressions may be used in constant functions, andidx_width()
fulfills all other criteria of a constant function. So unlessidx_width()
is called with non-constant parameters (in which case you should provide a call site), this should not be an issue.Either way, this remains closed as we do not intend to discuss the use of non-free tools.
Hi,
Thank you for your comments.
I fully understand you don't want discuss the use of non-free tools.
But I've just impressed your snitch paper(https://arxiv.org/abs/2002.10143) and I want to profile snitch complex core using DC-2018.06.
From the that paper, snitch is synthesized using DC-2017.09
There are 3 DC synthesis error points and all errors are caused $clog with variables.
The one is in idx_index
and others are in ecc_decoe.sv and ecc_encode.sv(actually same part)
for (int unsigned i = 1; i < unsigned'($bits(code_word_t)) + 1; i++) begin
// if i is a power of two we are indexing a parity bit
if (unsigned'(2**$clog2(i)) != i) begin
data_wo_parity[idx] = correct_data[i - 1];
idx++;
end
end
int
is not constant and you can see similar issue in this link https://stackoverflow.com/questions/62035337/how-to-slicing-array-interface-in-system-verliog
from snitch.
Hi,
This is again wrong. Math functions like $clog2()
may be used in constant expressions themselves, but that does not mean their arguments need to be constant expressions, unlike in the example of slicing interfaces you point to. In fact, the standard has no such requirement and even explicitly states that math functions can be used in constant expressions as long as all their arguments are also constant expressions, suggesting that they do not need to be.
Furthermore, the code you are now referring to is from a different repository we included as a dependency (pulp-platform/common_cells
) and, to the best of my knowledge, the modules ecc_encode
and ecc_decode
are never instantiated in Snitch RTL.
Lastly, you are now referring to completely different code than before; we were discussing idx_width()
from cf_math_pkg
before.
Please do not open an issue when there is no identifiable issue. This RTL is synthesizable on our end, and my best guess is that you are doing it wrong. We are happy to help, but we can only fix issues that exist on our end.
from snitch.
Related Issues (20)
- ci: Forced python version HOT 1
- occamy: Warning during CDEFS generation HOT 1
- banshee: Emit float register values as float instead of hex HOT 1
- Bender >=0.24 no longer resolves `export_include_dir` hierarchically HOT 2
- Quadrant Control: Wrong Reset value or comment HOT 2
- occamy: PCIE config regbus not connected HOT 1
- Submodule vendorized `pulp_platform` dependencies HOT 1
- SPI Host: FSM Bug CSAAT
- SPI Host: FSM Bug CSID Switch
- SPI Host: FSM Bug Read Enable HOT 1
- how to solve this issue 'mstatus' undeclared (first use in this function) HOT 2
- Occamy on FPGA - "axi_flat.svh" header file is missing on the repo HOT 1
- Incorrect decoding of `scfgri` causing deadlock HOT 1
- how to solve this issue:multiple definition of `_start'; HOT 1
- SSR writes '-inf' at the end HOT 3
- Repeated SSR configuration [enhancement] HOT 3
- annotate.py: Generate a warning when source file is newer than logs HOT 1
- Snitch to Wishbone Bridge HOT 1
- cmake does not work anymore for software setup HOT 5
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 snitch.