Emulation of Slave Interface
The eVA design emulator has a parameter NrOfProcesses. This parameter is an integer within the range 1 to 16. The parameter has the effect that a set of predefined registers for resetting and enabling the design are created. Following addresses will be configured:
- 0x00: Global Reset
- 0x01: Global Enable
- 0x02 * (i+1): Process Reset for process i (i < NrOfProcesses).
- 0x02 * (i+1) + 0x01: Process Enable for process i (i < NrOfProcesses).
So when NrOfProcesses = 2 the first 6 addresses of the slave interface address space will be used for controlling reset and enable of the emulated design. Each image port will be affiliated to one pair of reset and enable signals1 controlled by the above registers.
The emulator for the slave interface for register access is further configured by a text file which is set by the entity parameter RegisterDefinitionFile as provided in the above VHDL code2.
The following commands may be present in the register definition file:
|
Command |
Description |
|---|---|
|
REM |
Rest of line is comment |
|
DEF |
Define register. This command has the following syntax: DEF <addr> <width> <write_read> <init_value> with the parameters: <addr>: hexadecimal value of register address <width>: bit width of register <write_read>: 1 for write register, 0 for read register <init_value>: hexadecimal initial value |
|
CON |
Connect write register to read register. This command has the following syntax: CON <wrRegAddr> <rdRegAddr> with the parameters: <wrRegAddr>: address of write register (hex) <rdRegAddr>: address of read register (hex) |
|
WCK |
Wait for a number of clock cycles. The syntax is as follows: WCK <clock_ticks> with <clock_ticks> giving the number of clock ticks in hexadecimal format |
|
SET |
Set value of read register SET <rdRegAddr> <value> with the parameters: <rdRegAddr>: address of read register (hex) <value>: hexadecimal register value |
After the last parameter of any command, you can add a comment preceded by ‘#’.
The following code is an example register definition file which configures two write and two read registers, where one read register is preset after 16 clock cycles (address 0x7) and the other read register (address 0x6) is driven by the write register with address 0x6:
REM ************************************************************
REM Command formats: DEF <addr> <width> <write_read> <init_value>
REM CON <wrRegAddr> <rdRegAddr>
REM WCK <clock_ticks>
REM SET <rdRegAddr> <value>
REM ************************************************************
DEF 0006 10 1 00000000 #define write reg with width 0x10 at address 0x6
CON 0006 0006 #create read reg with addr 0x6 connected to
REM write register with address 0x6
DEF 0007 20 1 00000000 #define write reg with width 0x20 at address 0x7
DEF 0007 10 0 00000000 #define read register at address 0x7
WCK 0010 #wait for 16 clock cycles
SET 0007 0000000C #set read register value