Forum Discussion
Altera_Forum
Honored Contributor
11 years agotcl commands
For master_write_32 $master_path [expr $base_reconfig + 0x40*4], can anybody tell me what *4 means exactly? Thanks
3 Replies
- Altera_Forum
Honored Contributor
--- 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 - Altera_Forum
Honored Contributor
Thanks, Dave.
* here doesn't mean multiply. So 4*0x40 = 0x00000040. Is that correct? - Altera_Forum
Honored Contributor
--- 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 :)