Skip to content

Commit

Permalink
Merge pull request #1213 from slaclab/CXPoF
Browse files Browse the repository at this point in the history
CXPoF: TID VHDL Style Fix
  • Loading branch information
ruck314 authored Oct 25, 2024
2 parents db283cd + 9fbe2cd commit 5494d20
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions protocols/coaxpress/core/rtl/CoaXPressAxiL.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ entity CoaXPressAxiL is
TPD_G : time := 1 ns;
NUM_LANES_G : positive := 1;
STATUS_CNT_WIDTH_G : positive range 1 to 32 := 12;
RX_FSM_CNT_WIDTH_C : positive range 1 to 24 := 16; -- Optimize this down w.r.t camera to help make timing in CoaXPressRxHsFsm.vhd
RX_FSM_CNT_WIDTH_G : positive range 1 to 24 := 16; -- Optimize this down w.r.t camera to help make timing in CoaXPressRxHsFsm.vhd
AXIL_CLK_FREQ_G : real := 156.25E+6; -- axilClk frequency (units of Hz)
AXIS_CLK_FREQ_G : real := 156.25E+6; -- dataClk frequency (units of Hz)
AXIS_CONFIG_G : AxiStreamConfigType);
Expand Down Expand Up @@ -212,7 +212,7 @@ begin

axiSlaveRegisterR(axilEp, x"FE0", 0, toSlv(NUM_LANES_G, 8));
axiSlaveRegisterR(axilEp, x"FE0", 8, toSlv(STATUS_CNT_WIDTH_G, 8));
axiSlaveRegisterR(axilEp, x"FE0", 16, toSlv(RX_FSM_CNT_WIDTH_C, 8));
axiSlaveRegisterR(axilEp, x"FE0", 16, toSlv(RX_FSM_CNT_WIDTH_G, 8));

axiSlaveRegister (axilEp, X"FE8", 0, v.rxFsmRst);
axiSlaveRegister (axilEp, X"FEC", 0, v.txPulseWidth);
Expand Down
6 changes: 3 additions & 3 deletions protocols/coaxpress/core/rtl/CoaXPressCore.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ entity CoaXPressCore is
TPD_G : time := 1 ns;
NUM_LANES_G : positive range 1 to 8 := 1;
STATUS_CNT_WIDTH_G : positive range 1 to 32 := 12;
RX_FSM_CNT_WIDTH_C : positive range 1 to 24 := 16; -- Optimize this down w.r.t camera to help make timing in CoaXPressRxHsFsm.vhd
RX_FSM_CNT_WIDTH_G : positive range 1 to 24 := 16; -- Optimize this down w.r.t camera to help make timing in CoaXPressRxHsFsm.vhd
AXIL_CLK_FREQ_G : real := 156.25E+6; -- axilClk frequency (units of Hz)
AXIS_CLK_FREQ_G : real := 156.25E+6; -- dataClk frequency (units of Hz)
DATA_AXIS_CONFIG_G : AxiStreamConfigType;
Expand Down Expand Up @@ -162,7 +162,7 @@ begin
generic map (
TPD_G => TPD_G,
NUM_LANES_G => NUM_LANES_G,
RX_FSM_CNT_WIDTH_C => RX_FSM_CNT_WIDTH_C,
RX_FSM_CNT_WIDTH_G => RX_FSM_CNT_WIDTH_G,
AXIS_CONFIG_G => DATA_AXIS_CONFIG_G)
port map (
-- Data Interface (dataClk domain)
Expand Down Expand Up @@ -199,7 +199,7 @@ begin
TPD_G => TPD_G,
NUM_LANES_G => NUM_LANES_G,
STATUS_CNT_WIDTH_G => STATUS_CNT_WIDTH_G,
RX_FSM_CNT_WIDTH_C => RX_FSM_CNT_WIDTH_C,
RX_FSM_CNT_WIDTH_G => RX_FSM_CNT_WIDTH_G,
AXIL_CLK_FREQ_G => AXIL_CLK_FREQ_G,
AXIS_CLK_FREQ_G => AXIS_CLK_FREQ_G,
AXIS_CONFIG_G => DATA_AXIS_CONFIG_G)
Expand Down
4 changes: 2 additions & 2 deletions protocols/coaxpress/core/rtl/CoaXPressRx.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ entity CoaXPressRx is
generic (
TPD_G : time := 1 ns;
NUM_LANES_G : positive := 1;
RX_FSM_CNT_WIDTH_C : positive range 1 to 24 := 16; -- Optimize this down w.r.t camera to help make timing in CoaXPressRxHsFsm.vhd
RX_FSM_CNT_WIDTH_G : positive range 1 to 24 := 16; -- Optimize this down w.r.t camera to help make timing in CoaXPressRxHsFsm.vhd
AXIS_CONFIG_G : AxiStreamConfigType);
port (
-- Data Interface (dataClk domain)
Expand Down Expand Up @@ -180,7 +180,7 @@ begin
U_Fsm : entity surf.CoaXPressRxHsFsm
generic map (
TPD_G => TPD_G,
RX_FSM_CNT_WIDTH_C => RX_FSM_CNT_WIDTH_C,
RX_FSM_CNT_WIDTH_G => RX_FSM_CNT_WIDTH_G,
NUM_LANES_G => NUM_LANES_G)
port map (
-- Clock and Reset
Expand Down
12 changes: 6 additions & 6 deletions protocols/coaxpress/core/rtl/CoaXPressRxHsFsm.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use surf.CoaXPressPkg.all;
entity CoaXPressRxHsFsm is
generic (
TPD_G : time := 1 ns;
RX_FSM_CNT_WIDTH_C : positive range 1 to 24 := 16; -- Optimize this down w.r.t camera to help make timing in CoaXPressRxHsFsm.vhd
RX_FSM_CNT_WIDTH_G : positive range 1 to 24 := 16; -- Optimize this down w.r.t camera to help make timing in CoaXPressRxHsFsm.vhd
NUM_LANES_G : positive := 1);
port (
-- Clock and Reset
Expand Down Expand Up @@ -93,8 +93,8 @@ architecture rtl of CoaXPressRxHsFsm is

type RegType is record
endOfLine : sl;
yCnt : slv(RX_FSM_CNT_WIDTH_C-1 downto 0);
dCnt : slv(RX_FSM_CNT_WIDTH_C-1 downto 0);
yCnt : slv(RX_FSM_CNT_WIDTH_G-1 downto 0);
dCnt : slv(RX_FSM_CNT_WIDTH_G-1 downto 0);
hdrCnt : natural range 0 to 25;
hdr : ImageHdrType;
dbg : DebugType;
Expand Down Expand Up @@ -194,7 +194,7 @@ begin
v.yCnt := (others => '0');

-- Check for out of sync header
if (r.yCnt /= r.hdr.ySize(RX_FSM_CNT_WIDTH_C-1 downto 0)) then
if (r.yCnt /= r.hdr.ySize(RX_FSM_CNT_WIDTH_G-1 downto 0)) then
-- Set the flag
v.dbg.errDet := '1';
end if;
Expand Down Expand Up @@ -273,7 +273,7 @@ begin
v.dCnt := v.dCnt + 1;

-- Check for max count
if (v.dCnt = r.hdr.dsizeL(RX_FSM_CNT_WIDTH_C-1 downto 0)) then
if (v.dCnt = r.hdr.dsizeL(RX_FSM_CNT_WIDTH_G-1 downto 0)) then

-- Set the "end of line" flag
v.endOfLine := '1';
Expand Down Expand Up @@ -350,7 +350,7 @@ begin
v.yCnt := v.yCnt + 1;

-- Check for max count
if (v.yCnt = r.hdr.ySize(RX_FSM_CNT_WIDTH_C-1 downto 0)) then
if (v.yCnt = r.hdr.ySize(RX_FSM_CNT_WIDTH_G-1 downto 0)) then
-- Terminate the frame
v.dataMasters(1).tLast := '1';
end if;
Expand Down
4 changes: 2 additions & 2 deletions protocols/coaxpress/gthUs/rtl/CoaxpressOverFiberGthUs.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ entity CoaxpressOverFiberGthUs is
TPD_G : time := 1 ns;
NUM_LANES_G : positive := 1;
STATUS_CNT_WIDTH_G : positive range 1 to 32 := 12;
RX_FSM_CNT_WIDTH_C : positive range 1 to 24 := 16; -- Optimize this down w.r.t camera to help make timing in CoaXPressRxHsFsm.vhd
RX_FSM_CNT_WIDTH_G : positive range 1 to 24 := 16; -- Optimize this down w.r.t camera to help make timing in CoaXPressRxHsFsm.vhd
AXIL_BASE_ADDR_G : slv(31 downto 0);
AXIL_CLK_FREQ_G : real; -- axilClk frequency (units of Hz)
AXIS_CLK_FREQ_G : real; -- dataClk frequency (units of Hz)
Expand Down Expand Up @@ -132,7 +132,7 @@ begin
TPD_G => TPD_G,
NUM_LANES_G => NUM_LANES_G,
STATUS_CNT_WIDTH_G => STATUS_CNT_WIDTH_G,
RX_FSM_CNT_WIDTH_C => RX_FSM_CNT_WIDTH_C,
RX_FSM_CNT_WIDTH_G => RX_FSM_CNT_WIDTH_G,
DATA_AXIS_CONFIG_G => DATA_AXIS_CONFIG_G,
CFG_AXIS_CONFIG_G => CFG_AXIS_CONFIG_G,
AXIS_CLK_FREQ_G => AXIS_CLK_FREQ_G,
Expand Down
4 changes: 2 additions & 2 deletions protocols/coaxpress/gtyUs+/rtl/CoaxpressOverFiberGtyUs.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ entity CoaxpressOverFiberGtyUs is
TPD_G : time := 1 ns;
NUM_LANES_G : positive := 1;
STATUS_CNT_WIDTH_G : positive range 1 to 32 := 12;
RX_FSM_CNT_WIDTH_C : positive range 1 to 24 := 16; -- Optimize this down w.r.t camera to help make timing in CoaXPressRxHsFsm.vhd
RX_FSM_CNT_WIDTH_G : positive range 1 to 24 := 16; -- Optimize this down w.r.t camera to help make timing in CoaXPressRxHsFsm.vhd
AXIL_BASE_ADDR_G : slv(31 downto 0);
AXIL_CLK_FREQ_G : real; -- axilClk frequency (units of Hz)
AXIS_CLK_FREQ_G : real; -- dataClk frequency (units of Hz)
Expand Down Expand Up @@ -132,7 +132,7 @@ begin
TPD_G => TPD_G,
NUM_LANES_G => NUM_LANES_G,
STATUS_CNT_WIDTH_G => STATUS_CNT_WIDTH_G,
RX_FSM_CNT_WIDTH_C => RX_FSM_CNT_WIDTH_C,
RX_FSM_CNT_WIDTH_G => RX_FSM_CNT_WIDTH_G,
DATA_AXIS_CONFIG_G => DATA_AXIS_CONFIG_G,
CFG_AXIS_CONFIG_G => CFG_AXIS_CONFIG_G,
AXIS_CLK_FREQ_G => AXIS_CLK_FREQ_G,
Expand Down
2 changes: 1 addition & 1 deletion python/surf/protocols/coaxpress/_CoaXPressAxiL.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def __init__( self,
))

self.add(pr.RemoteVariable(
name = 'RX_FSM_CNT_WIDTH_C',
name = 'RX_FSM_CNT_WIDTH_G',
offset = 0xFE0,
bitSize = 8,
bitOffset = 16,
Expand Down

0 comments on commit 5494d20

Please sign in to comment.