Skip to content
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

# comments support in .mem files #1411

Closed
veripoolbot opened this issue Mar 26, 2019 · 2 comments
Closed

# comments support in .mem files #1411

veripoolbot opened this issue Mar 26, 2019 · 2 comments

Comments

@veripoolbot
Copy link

@veripoolbot veripoolbot commented Mar 26, 2019


Author Name: Frederic Requin
Original Redmine Issue: 1411 from https://www.veripool.org

Original Assignee: Frederic Requin


Hello,
I am using the excellent tool SRecord v1.64 (http://srecord.sourceforge.net/) to generate .mem files when compiling C for Nios II, LM32 or RISC-V CPUs.
This tool adds comments starting with '#' in the .mem file. It generates a runtime error while loading the .mem file.
A small change in "verilated.cpp" fixed the issue :

--- a/include/verilated.cpp
+++ b/include/verilated.cpp
@@ -1493,6 +1493,7 @@ void VL_READMEM_N(
          } else if (!ignore_to_eol && !ignore_to_cmt) {
              if (lastc=='/' && c=='*') { ignore_to_cmt = true; }
              else if (lastc=='/' && c=='/') { ignore_to_eol = true; }
+            else if (c=='#') { ignore_to_eol = true; }
              else if (c=='/') {}  // Part of /* or //
              else if (c=='_') {}
              else if (c=='@') { reading_addr = true; innum=false; needinc=false; }

Best regards,

Frederic

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Mar 27, 2019


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-03-27T11:40:41Z


Makes sense, love getting patches with requests!

Fixed in git towards 4.013.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented May 9, 2019


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-05-09T01:37:12Z


In 4.014.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.