Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20790 Discussions

get value from master_read_32

Altera_Forum
Honored Contributor II
6,582 Views

Hello evryone, 

 

I am trying to do a GUI interface with tcl to load the .sof that I generated into the FPGA with tcl. 

I want also in this tcl script read from a memory adress, get a value and put it into a label in the GUI interface. 

I am using master_read_32 command to do this: 

# set m_path [lindex [get_service_paths master] 0] 

 

# open_service master $m_path 

 

# master_read_32 $m_path 0x00000000 1 

 

to read the 32 bit value. 

 

My question is how can I save this value to put it into the label in the GUI interface!? 

 

I am waiting for some help please. 

Thanks a lot.
0 Kudos
23 Replies
Altera_Forum
Honored Contributor II
884 Views

 

--- Quote Start ---  

 

Thank you so much for your help. 

 

--- Quote End ---  

 

You're welcome. I'm glad to see that you are trying to figure it out for yourself. 

 

 

--- Quote Start ---  

 

I am stuck in something that without this I can't finish ... 

 

--- Quote End ---  

 

The Tcl variable jtag contains an element called jtag(address). In my application, this variable is the "address" field of the GUI. 

 

If you look at the jtag_client.tcl code, and search for the jtag(address) text you will see it used in the draw_read_write procedure as the textvariable associated with an entry widget, i.e., the entry element in the GUI is what defines the jtag(address) variable. 

 

If you have not used that same textvariable somewhere in your code, then it is not defined, so the calls to read fail. 

 

You can debug this type of issue in your code by creating the variable and assigning to it, eg., to set the address to 5 you could use 

 

tcl> set jtag(address) 5  

 

at the Tcl console. 

 

If you are still stuck, send me your Tcl code (either post it as an attachment to this thread, or email it to me directly), and I'll take a look at it. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
884 Views

I sent you an e-mail Dave. 

 

Kind Regards
0 Kudos
Altera_Forum
Honored Contributor II
884 Views

 

--- Quote Start ---  

I sent you an e-mail Dave. 

--- Quote End ---  

 

Ok, I got it, I'll take a look at your code when I get a chance (which will be some time later today). 

 

Cheers, 

Dave
0 Kudos
Reply