Skip to content

Commit

Permalink
Add FMC_PRSNT unsupported status for targets without physical pin
Browse files Browse the repository at this point in the history
  • Loading branch information
glennchid committed May 22, 2024
1 parent 6adac90 commit d13b922
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 9 deletions.
4 changes: 2 additions & 2 deletions common/hdl/defines/interface_types.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package interface_types is

type FMC_interface is
record
FMC_PRSNT : std_logic;
FMC_PRSNT : std_logic_vector(1 downto 0);
FMC_LA_P : std_logic_vector(33 downto 0);
FMC_LA_N : std_logic_vector(33 downto 0);
FMC_CLK0_M2C_P : std_logic;
Expand Down Expand Up @@ -86,7 +86,7 @@ end;

package body interface_types is

constant FMC_init : FMC_interface := ( FMC_PRSNT => '0',
constant FMC_init : FMC_interface := ( FMC_PRSNT => "00",
FMC_LA_P => (others => 'Z'),
FMC_LA_N => (others => 'Z'),
FMC_CLK0_M2C_P => 'Z',
Expand Down
10 changes: 8 additions & 2 deletions modules/fmc_24vio/fmc_24vio.block.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ constraints: const/fmc_24vio_impl.xdc
block_suffixes: IN OUT

[IN.FMC_PRSNT]
type: read
type: read enum
description: FMC present
0: FMC Connected
1: FMC Disconnected
2: FMC_PRSNT not supported

[IN.VTSEL]
type: param enum
Expand Down Expand Up @@ -61,8 +64,11 @@ type: read
description: Input Voltage and Temp Alarm (Active Low)

[OUT.FMC_PRSNT]
type: read
type: read enum
description: FMC present
0: FMC Connected
1: FMC Disconnected
2: FMC_PRSNT not supported

[OUT.VAL1]
type: bit_mux
Expand Down
2 changes: 1 addition & 1 deletion modules/fmc_24vio/hdl/fmc_24vio_wrapper.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ begin
---------------------------------------------------------------------------
-- FMC CSR Interface
---------------------------------------------------------------------------
FMC_PRSNT_DW <= ZEROS(31) & FMC.FMC_PRSNT;
FMC_PRSNT_DW <= ZEROS(30) & FMC.FMC_PRSNT;

fmc_ctrl : entity work.fmc_24vio_ctrl
port map (
Expand Down
5 changes: 4 additions & 1 deletion modules/fmc_loopback/fmc_loopback.block.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ type: param
description: Loopback toggle period for IO

[FMC_PRSNT]
type: read
type: read enum
description: FMC present
0: FMC Connected
1: FMC Disconnected
2: FMC_PRSNT not supported

[LA_P_ERROR]
type: read
Expand Down
2 changes: 1 addition & 1 deletion modules/fmc_loopback/hdl/fmc_loopback_wrapper.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ port map (
---------------------------------------------------------------------------
-- FMC CSR Interface
---------------------------------------------------------------------------
FMC_PRSNT_DW <= ZEROS(31) & FMC.FMC_PRSNT;
FMC_PRSNT_DW <= ZEROS(30) & FMC.FMC_PRSNT;

fmc_ctrl : entity work.fmc_loopback_ctrl
port map (
Expand Down
2 changes: 1 addition & 1 deletion targets/PandABox/hdl/PandABox_top.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ pos_bus(POS_BUS_SIZE-1 downto 0) <= inenc_val;
-- Assemble FMC records

FMC_gen: for I in 0 to NUM_FMC-1 generate
FMC.FMC_ARR(I).FMC_PRSNT <= FMC_PRSNT(I);
FMC.FMC_ARR(I).FMC_PRSNT <= '0' & FMC_PRSNT(I);
FMC.FMC_ARR(I).FMC_LA_P <= FMC_LA_P(I);
FMC.FMC_ARR(I).FMC_LA_N <= FMC_LA_N(I);
FMC.FMC_ARR(I).FMC_CLK0_M2C_P <= FMC_CLK0_M2C_P(I);
Expand Down
2 changes: 1 addition & 1 deletion targets/ZedBoard/hdl/ZedBoard_top.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ bit_bus(BIT_BUS_SIZE-1 downto 0 ) <= pcap_active;
-- Assemble FMC records

FMC_gen: for I in 0 to NUM_FMC-1 generate
FMC.FMC_ARR(I).FMC_PRSNT <= FMC_PRSNT(I);
FMC.FMC_ARR(I).FMC_PRSNT <= '0' & FMC_PRSNT(I);
FMC.FMC_ARR(I).FMC_LA_P <= FMC_LA_P(I);
FMC.FMC_ARR(I).FMC_LA_N <= FMC_LA_N(I);
FMC.FMC_ARR(I).FMC_CLK0_M2C_P <= FMC_CLK0_M2C_P(I);
Expand Down
1 change: 1 addition & 0 deletions targets/xu5_st1/hdl/xu5_st1_top.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ bit_bus(BIT_BUS_SIZE-1 downto 0 ) <= pcap_active & ttlin_val;
-- Assemble FMC records

FMC_gen: for I in 0 to NUM_FMC-1 generate
FMC.FMC_ARR(I).FMC_PRSNT <= "10";
FMC.FMC_ARR(I).FMC_LA_P <= FMC_LA_P(I);
FMC.FMC_ARR(I).FMC_LA_N <= FMC_LA_N(I);
FMC.FMC_ARR(I).FMC_CLK0_M2C_P <= FMC_CLK0_M2C_P(I);
Expand Down

0 comments on commit d13b922

Please sign in to comment.