RegisterLogin  
Update Profile
   
You are here: Forum  
Minimize 
SVUG Community Forum
Subject: using a string to set a HDL signal
Prev Next
You are not authorized to post a reply.

Author Messages
RaviUser is Offline

Posts:1

05/06/2008 4:04 PM  
Folks,
I need to read the rtl path of a register from a text file and access it.
This question boils down to, I have two variables like so...

string = "top.design.unit.myregister"
val = 'habcd;

I need to set myregister to 0xabcd.

I'd like to avoid writing a PLI if possible.

Can someone suggest a way?

Thanks,
-ravi
DaveUser is Offline

Posts:17

05/06/2008 6:41 PM  
There is no way to access a signal via a dynamic string name without using the PLI/VPI/DPI. If the text file is used for initialization, why not convert it to legal Verilog/SystemVerilog to begin with.

Dave
GeoffUser is Offline

Posts:7

05/08/2008 8:34 PM  
If the file only has the 1 signal name, then you can do this:


`include "file" = 'habcd ;

so it will simply expand..

But you probably are reading in a from a larger file...


You are not authorized to post a reply.
Forums > General Discussion > Main Discussion Area > using a string to set a HDL signal



ActiveForums 3.7
  

 Copyright 2008 by SystemVerilog User Group Contact Us    Privacy Statement