aboutsummaryrefslogtreecommitdiffstats
path: root/fpga/usrp3/sim/rfnoc/PkgAxisCtrlBfm.sv
diff options
context:
space:
mode:
authorAndrew Moch <Andrew.Moch@ni.com>2020-06-22 17:13:36 +0100
committerWade Fife <wade.fife@ettus.com>2020-06-25 14:44:04 -0500
commitc3bca6c87700054c96320de119a58f6a688dbd5a (patch)
tree5caa6aca23b6ea84335ea22398698aa1ea3569ea /fpga/usrp3/sim/rfnoc/PkgAxisCtrlBfm.sv
parent8661f46df66329511ccb3cf083830e19d65ea402 (diff)
downloaduhd-c3bca6c87700054c96320de119a58f6a688dbd5a.tar.gz
uhd-c3bca6c87700054c96320de119a58f6a688dbd5a.tar.bz2
uhd-c3bca6c87700054c96320de119a58f6a688dbd5a.zip
fpga: lib: Add synthesizable AXI4-Stream SV components
Components are connected together with AxiStreamIfc. Some features include: (1) Add bytes to the start of a packet (2) Remove bytes from a packet (3) Wrappers for some older components a. fifo - buffer but imediately pass a packet b. packet_gate - buffer and hold till end of packet c. width_conv - cross clock domains and change width of axi bus The AxiStreamIf was moved from PkgAxiStreamBfm to its own file. It can be used to connect to ports with continuous assignment. AxiStreamPacketIf must be used procedurally but allows the following new methods: - reached_packet_byte - notify when tdata contains a paritcular byte - get_packet_byte/get_packet_field - extract a byte or field from axi - put_packet_byte/put_packet_field - overwrite a byte or field onto axi
Diffstat (limited to 'fpga/usrp3/sim/rfnoc/PkgAxisCtrlBfm.sv')
-rw-r--r--fpga/usrp3/sim/rfnoc/PkgAxisCtrlBfm.sv18
1 files changed, 9 insertions, 9 deletions
diff --git a/fpga/usrp3/sim/rfnoc/PkgAxisCtrlBfm.sv b/fpga/usrp3/sim/rfnoc/PkgAxisCtrlBfm.sv
index 148ef5488..cc4c9ac18 100644
--- a/fpga/usrp3/sim/rfnoc/PkgAxisCtrlBfm.sv
+++ b/fpga/usrp3/sim/rfnoc/PkgAxisCtrlBfm.sv
@@ -5,7 +5,7 @@
//
// Module: PkgAxisCtrlBfm
//
-// Description: Package for an AXIS-Ctrl bus functional model (BFM), which
+// Description: Package for an AXIS-Ctrl bus functional model (BFM), which
// consists primarily of the AxisCtrlPacket and AxisCtrlBfm classes.
//
@@ -129,7 +129,7 @@ package PkgAxisCtrlBfm;
// AXIS-Ctrl BFM Methods
//---------------------------------------------------------------------------
- // Class constructor. This must be given an interface for the master
+ // Class constructor. This must be given an interface for the master
// connection and an interface for the slave connection.
function AxisCtrlBfm::new (
virtual AxiStreamIf #(32).master master,
@@ -147,7 +147,7 @@ package PkgAxisCtrlBfm;
endtask : put_ctrl
- // Attempt to queue the provided packet for transmission. Return 1 if
+ // Attempt to queue the provided packet for transmission. Return 1 if
// successful, return 0 if the queue is full.
task AxisCtrlBfm::try_put_ctrl(AxisCtrlPacket ctrl_packet);
AxisPacket_t axis_packet;
@@ -163,7 +163,7 @@ package PkgAxisCtrlBfm;
endtask : get_ctrl
- // Get the next packet if there's one available and return 1. Return 0 if
+ // Get the next packet if there's one available and return 1. Return 0 if
// there's no packet available.
function bit AxisCtrlBfm::try_get_ctrl(output AxisCtrlPacket ctrl_packet);
AxisPacket_t axis_packet;
@@ -173,7 +173,7 @@ package PkgAxisCtrlBfm;
endfunction : try_get_ctrl
- // Convert an AXIS-Ctrl packet data structure to an AXI-Stream packet data
+ // Convert an AXIS-Ctrl packet data structure to an AXI-Stream packet data
// structure.
function AxisCtrlBfm::AxisPacket_t AxisCtrlBfm::axis_ctrl_to_axis(AxisCtrlPacket ctrl_packet);
AxisPacket_t axis_packet = new();
@@ -184,7 +184,7 @@ package PkgAxisCtrlBfm;
axis_packet.data.push_back(ctrl_packet.header[63:32]);
// Insert timestamp if has_time is set (words 2 and 3)
- if (ctrl_packet.header.has_time) begin
+ if (ctrl_packet.header.has_time) begin
axis_packet.data.push_back(ctrl_packet.timestamp[31: 0]);
axis_packet.data.push_back(ctrl_packet.timestamp[63:32]);
end
@@ -201,12 +201,12 @@ package PkgAxisCtrlBfm;
endfunction : axis_ctrl_to_axis
- // Convert an AXI-Stream packet data structure to an AXIS-Ctrl packet data
+ // Convert an AXI-Stream packet data structure to an AXIS-Ctrl packet data
// structure.
function AxisCtrlPacket AxisCtrlBfm::axis_to_axis_ctrl(AxisPacket_t axis_packet);
AxisCtrlPacket ctrl_packet = new();
int i; // Use an index instead of pop_front() to workaround a ModelSim bug
-
+
// Grab words 0 and 1 (header)
ctrl_packet.header[31: 0] = axis_packet.data[0];
ctrl_packet.header[63:32] = axis_packet.data[1];
@@ -224,7 +224,7 @@ package PkgAxisCtrlBfm;
// Grab data
ctrl_packet.data = axis_packet.data[(i+1):$];
-
+
return ctrl_packet;
endfunction : axis_to_axis_ctrl