FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP

tcl commands

Altera_Forum
Honored Contributor II
1,354 Views

For master_write_32 $master_path [expr $base_reconfig + 0x40*4], can anybody tell me what *4 means exactly? Thanks

0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
316 Views

 

--- Quote Start ---  

For master_write_32 $master_path [expr $base_reconfig + 0x40*4], can anybody tell me what *4 means exactly? Thanks 

--- Quote End ---  

 

Avalon-MM master addresses are 32-bits wide. The address map for the reconfiguration controller probably has the register offsets in words, i.e., the register located at 32-bit word offset 0x40 is located at byte offset 4*0x40. 

 

If the address map for the reconfiguration controller is already in byte offsets, and the register you want to access is at byte-offset 0x40, then the 4* would be unnecessary. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
316 Views

Thanks, Dave. 

 

* here doesn't mean multiply. So 4*0x40 = 0x00000040. Is that correct?
0 Kudos
Altera_Forum
Honored Contributor II
316 Views

 

--- Quote Start ---  

here doesn't mean multiply. So 4*0x40 = 0x00000040 

--- Quote End ---  

 

 

The Tcl command expr means "do some math", so 4*0x40 = 0x100 :)
0 Kudos
Reply