-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error: ScTool internal error : Record owner is not variable #80
Comments
In the project, there is Generally, I would recommend to rid of |
Thank you very much for the quick reply and the time you spent. |
There is synthesizable subset of SystemC which is supported for hardware synthesis. Custom data types are generally supported. Helper functions are also supported in most cases. |
Thank you for the resources, they are very helpful. |
That needs to be checked. Normally you run a compiler periodically for a new portion of code to ensure the code syntaxis is correct. As soon as you come with large amount of code it is difficult to say how many fixes it requires. General recommendation is to think of which HW cells are generated for SystemC statements you are writing. Many places can be simplified and rewritten more efficiently from HW viewpoint. |
I understand, I will definitely take that into account and do it that way, if necessary I will get in touch again. |
I am currently trying to synthesize each module one by one, now I got this error: --------------------------------------------------------------
Intel Compiler for SystemC (ICSC) version 1.6.12, Feb 10,2024
--------------------------------------------------------------
Top module is ADDER_SUBTRACTOR
Elaboration database created
error: ScTool internal error : SValue::getRecord() incorrect type
sata_sctool: /home/robert/Downloads/sc_tools/icsc/sc_tool/lib/sc_tool/cfg/SValue.cpp:480: sc::SRecord& sc::SValue::getRecord() const: Assertion `false' failed. What does this error mean, how can I fix it? |
Could you provide updated Cmake with svc_target for this target? I see two instances of ADDER_SUBTRACTOR module. |
I just added a new adder subtractor instance in the system module. |
Although I have just pushed a new commit, I am still referring to this: |
That not compiled at my side: Please add 2nd compilation target in CMakeLIst.txt with another main.cpp or ifdef in the current one. Try that it is compiled and passed stage BUILD in ICSC at your side. I wont do any changes in your code. |
Thank you for your patience. |
The problem was in For Another thing, there is almost no reason to use any pointers. Instead of SC object pointers array it needs to use |
Thank you so much, that was so helpful! |
You could find examples in designs/examples and designs/tests folders. For sc_vector there is https://github.com/intel/systemc-compiler/blob/main/designs/tests/misc/test_sc_vector1.cpp and many others. |
Thank you, but didn't you suggest an sc object vector? |
SC objects are all the classes inherit |
Understood, but don't modules have constructors that need to be called? |
There is an option how to call module constructor with additional parameters. See IEEE1666 for more details. sc_vector<sct_initiator<T>> init{"init", N, // Three parameters
[](const char* name, size_t i) { // Lambda function
return sc_new<sct_initiator<T>>(name, 1); // Initiator with sync register
}}; |
I'll give it a try, thank you very much. |
Thank you very much, the adder subtractor actually synthesizes!
/home/robert/Downloads/sc_tools/designs/Bachelor/Source Code/cpp/../hpp/shift_register.hpp:12:9: warning: Channel read in CTHREAD reset section is prohibited : shift_register_state
12 | sc_out<btint<T>> shift_register_state;
| ^
/home/robert/Downloads/sc_tools/designs/Bachelor/Source Code/cpp/shift_register.cpp:9:36: error: No record object found for member call : sc_out<struct btint<8>> system.shift_register.port_3_REC_3 sc_out<struct btint<8>> system.shift_register.port_3_REC_3
9 | shift_register_state.write(shift_register_state.read().shift_right(1).set_value(T - 1, shift_register_input.read().get_value(0)));
| ^
/home/robert/Downloads/sc_tools/designs/Bachelor/Source Code/cpp/../hpp/btint.hpp:86:44: fatal error: Incorrect range access, different variables in lo/hi
86 | output.btint_a = btint_a.range(from, to);
| ^ This works: btint<T> output;
output.btint_a = shift_register_input.read().btint_a.range(T, 1);
output.btint_b = shift_register_input.read().btint_b.range(T, 1);
output = output.set_overflow(shift_register_input.read().get_overflow());
shift_register_output.write(output); But not this: shift_register_output.write(shift_register_input.read().range(T, 1)); Please excuse me for taking up so much of your time, I really appreciate it! |
|
It has successfully synthesized, thank you so much! |
Generated RTL with warnings can be correct, but it is good practice to check the warnings. |
Makes sense, thank you. |
I've been trying for quite some time now to generate a bitstream from the successfully synthesized SystemVerilog file using Vivado.
Unfortunately, I’m not familiar with SystemVerilog, which makes it difficult for me to understand these messages - let alone fix them. |
That does not look like SV syntaxis error, more likely related to FPGA specific requirements. I would start to check if |
Thanks for your reply! |
I do not have expirience with Vivado. You need to go thorugh a Vivado example with a user guide. Google suggests "explicitly set the "IOSTANDARD" property for each port to a valid standard based on your board and design requirements." |
Thanks for the suggestion! |
I’ve managed to generate the bitstream and even verified the functionality on an FPGA. Once again, a huge thank you for everything – without you, this would have simply been impossible. I do have two final questions though:
Thanks again in advance! |
|
|
In SystemC simulation native C++ types are used for <=64bit numbers. |
Ah, I see, thank you very much! |
First of all, I want to thank you very much for this great project and all the hard work that has gone into it.
I am currently pursuing my Bachelor's degree in Computer Science and it's been incredibly helpful for my studies.
Since this is my first time using SystemC, I apologize in advance for any poorly written code.
Description:
When running the following command:
I encountered this error:
The issue occurs during the synthesis process.
You can find my repository here: https://github.com/libalis/bachelor.
Additional Information:
I would greatly appreciate any help or insights regarding this issue.
Thank you again for all the effort you’ve put into this amazing project!
The text was updated successfully, but these errors were encountered: