Payload firmware: Interface¶
The EMP framework top-level designs instantiate an entity - named
emp_payload
- and connects its input/output ports to the clocking
infrastructure, control bus, and input/output buffers, as described in
the introduction page. Various configurable aspects of the infrastructural
firmware (such as the I/O clock frequency and the depths of the I/O latency
buffers) are controlled by the values of constants
defined in the emp_payload_decl
package. This page outlines requirements
on the port map of the emp_payload
entity, and lists the constants that
users must define in the emp_project_decl
and tb_decl
packages.
emp_payload
entity¶
If you are developing a custom “physics algorithm” payload to integrate
into the EMP framework designs, this payload should be implemented in
an entity named emp_payload
, with the following input and output ports:
Name |
Type |
Description |
|
---|---|---|---|
in |
|
|
IPbus clock |
in |
|
|
IPbus reset |
in |
|
|
IPbus fabric (in) |
out |
|
|
IPbus fabric (out) |
in |
|
|
Auxiliary clocks for algorithms |
in |
|
|
Resets aligned to auxiliary clocks |
in |
|
|
Clock for main I/O data |
in |
|
|
Region-local reset
(clock domain: |
in |
|
|
|
in |
|
|
TTC counters |
out |
|
|
|
in |
|
|
Input data channels |
out |
|
|
Output data channels |
out |
|
|
|
out |
|
|
emp_project_decl
package¶
The emp_project_decl
package must define the following constants:
Examples of the emp_project_decl
package for various boards can be found
in the emp-fwk
repository, under the projects/example
directory.
tb_decl
package¶
The tb_decl
package is only required when simulating the payload firmware;
it must define the following constants:
Name |
Type |
Description |
---|---|---|
|
|
Default path to the source file
(Used if
sourcefile generic not specified at runtime) |
|
|
Default path to the sink file
(Used if
sinkfile generic not specified at runtime) |
|
|
Number of frames to be played from source file |
|
|
Number of frames to be captured in sink file |
|
|
“Quiet” time at the beginning of the simulation before data from source is injected |
|
|
Index of the first frame from the source file that will be injected into the payload |
|
|
Number of clock cycles before the output data is captured |
|
|
Toggles playback of data in a continuous loop (rather than only playing the data once) |
|
|
Toggle whether the header frame - i.e. the first valid frame of the packet - is
removed before injecting data into the payload
|
|
|
Toggle whether a header frame is inserted before the first valid frame |
An example of the tb_decl
package can be found in the emp-fwk
repository, in file projects/examples/testbench/firmware/hdl/tb_decl.vhd
.