Skip to content

Commit

Permalink
Remove fields and blocks to stop bit_bus and pos_bus
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtrafford committed Oct 7, 2024
1 parent 4e89d2b commit 2a08432
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 36 deletions.
2 changes: 1 addition & 1 deletion apps/PandABrick.app.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description:
- built-in FMC encoder card
- PandA synchroniser on SFP on-board FMC
target: PandABrick
includes: common_soft_blocks.include.ini
includes: pandabrick_soft_blocks.include.ini

[SFP_SYNC]
module: sfp_panda_sync
Expand Down
35 changes: 35 additions & 0 deletions includes/pandabrick_soft_blocks.include.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[BITS]
number: 1

[CALC]
number: 2

[CLOCK]
number: 2

[COUNTER]
number: 4

[DIV]
number: 2

[FILTER]
number: 2

[LUT]
number: 8

[PCOMP]
number: 2

[PGEN]
number: 2

[PULSE]
number: 4

[SEQ]
number: 2

[SRGATE]
number: 4
18 changes: 9 additions & 9 deletions modules/incenc/incenc.block.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ description: Set point
type: param bit
description: Zero position on Z rising edge

[A]
type: bit_out
description: Quadrature A if in incremental mode
; [A]
; type: bit_out
; description: Quadrature A if in incremental mode

[B]
type: bit_out
description: Quadrature B if in incremental mode
; [B]
; type: bit_out
; description: Quadrature B if in incremental mode

[Z]
type: bit_out
description: Z index channel if in incremental mode
; [Z]
; type: bit_out
; description: Z index channel if in incremental mode

[CONN]
type: bit_out
Expand Down
12 changes: 6 additions & 6 deletions targets/PandABrick/hdl/PandABrick_encoders.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ port (
posn_i : in std_logic_vector(31 downto 0);
enable_i : in std_logic;
-- Encoder I/O Pads
INCENC_A_o : out std_logic;
INCENC_B_o : out std_logic;
INCENC_Z_o : out std_logic;
-- INCENC_A_o : out std_logic;
-- INCENC_B_o : out std_logic;
-- INCENC_Z_o : out std_logic;
ABSENC_DATA_o : out std_logic;
--
clk_out_ext_i : in std_logic;
Expand Down Expand Up @@ -555,9 +555,9 @@ As0_opad <= A_OUT;
Bs0_opad <= B_OUT;
Zs0_opad <= Z_OUT;

INCENC_A_o <= A_IN;
INCENC_B_o <= B_IN;
INCENC_Z_o <= Z_IN;
-- INCENC_A_o <= A_IN;
-- INCENC_B_o <= B_IN;
-- INCENC_Z_o <= Z_IN;

ABSENC_DATA_o <= DATA_IN;

Expand Down
12 changes: 6 additions & 6 deletions targets/PandABrick/hdl/PandABrick_encoders_block.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ port (
write_address_i : in std_logic_vector(BLK_AW-1 downto 0);
write_data_i : in std_logic_vector(31 downto 0);
-- Encoder I/O Pads
INCENC_A_o : out std_logic;
INCENC_B_o : out std_logic;
INCENC_Z_o : out std_logic;
-- INCENC_A_o : out std_logic;
-- INCENC_B_o : out std_logic;
-- INCENC_Z_o : out std_logic;

ABSENC_DATA_o : out std_logic;

Expand Down Expand Up @@ -303,9 +303,9 @@ port map(
posn_i => posn,
enable_i => enable,
-- Encoder I/O Pads
INCENC_A_o => INCENC_A_o,
INCENC_B_o => INCENC_B_o,
INCENC_Z_o => INCENC_Z_o,
-- INCENC_A_o => INCENC_A_o,
-- INCENC_B_o => INCENC_B_o,
-- INCENC_Z_o => INCENC_Z_o,
ABSENC_DATA_o => ABSENC_DATA_o,
--
clk_out_ext_i => clk_ext,
Expand Down
12 changes: 6 additions & 6 deletions targets/PandABrick/hdl/PandABrick_encoders_top.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ port (

-- Signals passed to internal bus
clk_int_o : out std_logic_vector(ENC_NUM-1 downto 0);
incenc_a_o : out std_logic_vector(ENC_NUM-1 downto 0);
incenc_b_o : out std_logic_vector(ENC_NUM-1 downto 0);
incenc_z_o : out std_logic_vector(ENC_NUM-1 downto 0);
-- incenc_a_o : out std_logic_vector(ENC_NUM-1 downto 0);
-- incenc_b_o : out std_logic_vector(ENC_NUM-1 downto 0);
-- incenc_z_o : out std_logic_vector(ENC_NUM-1 downto 0);
absenc_data_o : out std_logic_vector(ENC_NUM-1 downto 0);
-- Block Input and Outputs
bit_bus_i : in bit_bus_t;
Expand Down Expand Up @@ -191,9 +191,9 @@ port map (
ABSENC_CONN_OUT_o => ABSENC_CONN_OUT_o(I),

clk_int_o => clk_int_o(I),
incenc_a_o => incenc_a_o(I),
incenc_b_o => incenc_b_o(I),
incenc_z_o => incenc_z_o(I),
-- incenc_a_o => incenc_a_o(I),
-- incenc_b_o => incenc_b_o(I),
-- incenc_z_o => incenc_z_o(I),
absenc_data_o => absenc_data_o(I),

PMACENC_PROTOCOL_o => PMACENC_PROTOCOL_o(I),
Expand Down
15 changes: 7 additions & 8 deletions targets/PandABrick/hdl/PandABrick_top.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,9 @@ signal pins_T : std_logic_vector(ENC_NUM-1 downto 0);
-- Incremental Encoder
signal incenc_val : std32_array(ENC_NUM-1 downto 0);
signal incenc_conn : std_logic_vector(ENC_NUM-1 downto 0);
signal incenc_a : std_logic_vector(ENC_NUM-1 downto 0);
signal incenc_b : std_logic_vector(ENC_NUM-1 downto 0);
signal incenc_z : std_logic_vector(ENC_NUM-1 downto 0);
-- signal incenc_a : std_logic_vector(ENC_NUM-1 downto 0);
-- signal incenc_b : std_logic_vector(ENC_NUM-1 downto 0);
-- signal incenc_z : std_logic_vector(ENC_NUM-1 downto 0);
signal INCENC_PROTOCOL : std32_array(ENC_NUM-1 downto 0);
signal INCENC_PROTOCOL_WSTB : std_logic_vector(ENC_NUM-1 downto 0);

Expand Down Expand Up @@ -1275,9 +1275,9 @@ port map (

-- Signals passed to internal bus
clk_int_o => pmacenc_clk,
incenc_a_o => incenc_a,
incenc_b_o => incenc_b,
incenc_z_o => incenc_z,
-- incenc_a_o => incenc_a,
-- incenc_b_o => incenc_b,
-- incenc_z_o => incenc_z,
absenc_data_o => absenc_data,
-- Block Input and Outputs
bit_bus_i => bit_bus,
Expand All @@ -1301,8 +1301,7 @@ port map (
-- BIT_BUS_SIZE and POS_BUS_SIZE declared in addr_defines.vhd

bit_bus(BIT_BUS_SIZE-1 downto 0 ) <= pcap_active & pmacenc_clk & incenc_conn &
incenc_z & incenc_b & incenc_a & absenc_data &
absenc_conn & ttlin_val;
absenc_data & absenc_conn & ttlin_val;

pos_bus(POS_BUS_SIZE-1 downto 0) <= incenc_val & absenc_val;

Expand Down

0 comments on commit 2a08432

Please sign in to comment.