Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermerc committed May 17, 2024
2 parents 2bf44cd + e0cc39f commit 6d2fc6a
Show file tree
Hide file tree
Showing 59 changed files with 3,472 additions and 3,225 deletions.
2 changes: 1 addition & 1 deletion hdl/ip_cores/infra-cores
Submodule infra-cores updated 47 files
+19 −0 .github/workflows/test.yml
+3 −1 modules/common/Manifest.py
+3 −0 modules/common/biquad/Manifest.py
+218 −0 modules/common/biquad/biquad.vhd
+72 −0 modules/common/ifc_common_pkg.vhd
+3 −0 modules/common/iir_filt/Manifest.py
+140 −0 modules/common/iir_filt/iir_filt.vhd
+1 −0 modules/wishbone/Manifest.py
+54 −0 modules/wishbone/ifc_wishbone_pkg.vhd
+5 −0 modules/wishbone/wb_master_uart/Manifest.py
+176 −0 modules/wishbone/wb_master_uart/uart.vhd
+485 −0 modules/wishbone/wb_master_uart/wb_master_uart.vhd
+75 −0 modules/wishbone/wb_master_uart/xwb_master_uart.vhd
+589 −391 platform/xilinx/artix7/afc_v3/axi_datamover_0/axi_datamover_0.xci
+598 −402 platform/xilinx/artix7/afc_v3/axi_datamover_bpm/axi_datamover_bpm.xci
+895 −1,500 platform/xilinx/artix7/afc_v3/axi_interconnect/axi_interconnect.xci
+1,699 −1,520 platform/xilinx/artix7/afc_v3/axi_interconnect_bpm/axi_interconnect_bpm.xci
+589 −391 platform/xilinx/artix7/afc_v4/axi_datamover_0/axi_datamover_0.xci
+598 −402 platform/xilinx/artix7/afc_v4/axi_datamover_bpm/axi_datamover_bpm.xci
+895 −1,500 platform/xilinx/artix7/afc_v4/axi_interconnect/axi_interconnect.xci
+1,699 −1,520 platform/xilinx/artix7/afc_v4/axi_interconnect_bpm/axi_interconnect_bpm.xci
+6,301 −3,251 platform/xilinx/artix7/chipscope/ila_t8_d256_s4096_cap/ila_t8_d256_s4096_cap.xci
+6,301 −3,251 platform/xilinx/artix7/chipscope/ila_t8_d256_s8192_cap/ila_t8_d256_s8192_cap.xci
+1,632 −830 platform/xilinx/artix7/chipscope/vio_din2_w128_dout2_w128/vio_din2_w128_dout2_w128.xci
+1,632 −830 platform/xilinx/artix7/chipscope/vio_din2_w64_dout2_w64/vio_din2_w64_dout2_w64.xci
+2 −0 testbench/common/anti_windup_accumulator/ghdl/.gitignore
+9 −0 testbench/common/biquad/Manifest.py
+1 −0 testbench/common/biquad/biquad_coeffs.dat
+172 −0 testbench/common/biquad/biquad_tb.vhd
+200 −0 testbench/common/biquad/biquad_x_y.dat
+4 −0 testbench/common/biquad/ghdl/.gitignore
+8 −0 testbench/common/biquad/ghdl/Manifest.py
+9 −0 testbench/common/iir_filt/Manifest.py
+4 −0 testbench/common/iir_filt/ghdl/.gitignore
+8 −0 testbench/common/iir_filt/ghdl/Manifest.py
+5 −0 testbench/common/iir_filt/iir_filt_coeffs.dat
+183 −0 testbench/common/iir_filt/iir_filt_tb.vhd
+200 −0 testbench/common/iir_filt/iir_filt_x_y.dat
+12 −0 testbench/test-all.sh
+10 −0 testbench/wishbone/wb_master_uart/Manifest.py
+3 −0 testbench/wishbone/wb_master_uart/cheby/build_cheby.sh
+84 −0 testbench/wishbone/wb_master_uart/cheby/generic_dpram.vhd
+15 −0 testbench/wishbone/wb_master_uart/cheby/ram.cheby
+164 −0 testbench/wishbone/wb_master_uart/cheby/wb_ram.vhd
+4 −0 testbench/wishbone/wb_master_uart/ghdl/.gitignore
+9 −0 testbench/wishbone/wb_master_uart/ghdl/Manifest.py
+353 −0 testbench/wishbone/wb_master_uart/wb_master_uart_tb.vhd
3 changes: 2 additions & 1 deletion hdl/modules/Manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
modules = { "local": [
"fofb_ctrl_wrapper",
"fofb_processing",
"fofb_sys_id"
"fofb_sys_id",
"fofb_shaper_filt"
]
}
42 changes: 42 additions & 0 deletions hdl/modules/fofb_ctrl_pkg.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,31 @@ package fofb_ctrl_pkg is
);
end component;

component xwb_fofb_shaper_filt is
generic (
g_CHANNELS : natural;
g_NUM_BIQUADS : natural;
g_COEFF_INT_WIDTH : natural;
g_COEFF_FRAC_WIDTH : natural;
g_ARITH_EXTRA_BITS : natural;
g_IFCS_EXTRA_BITS : natural;
g_INTERFACE_MODE : t_wishbone_interface_mode := CLASSIC;
g_ADDRESS_GRANULARITY : t_wishbone_address_granularity := WORD;
g_WITH_EXTRA_WB_REG : boolean := false
);
port (
clk_i : in std_logic;
rst_n_i : in std_logic;
sp_arr_i : in t_sp_arr(g_CHANNELS-1 DOWNTO 0);
sp_valid_arr_i : in std_logic_vector(g_CHANNELS-1 DOWNTO 0);
busy_arr_o : out std_logic_vector(g_CHANNELS-1 DOWNTO 0);
filt_sp_arr_o : out t_sp_arr(g_CHANNELS-1 DOWNTO 0);
filt_sp_valid_arr_o : out std_logic_vector(g_CHANNELS-1 DOWNTO 0);
wb_slv_i : in t_wishbone_slave_in;
wb_slv_o : out t_wishbone_slave_out
);
end component xwb_fofb_shaper_filt;

component fofb_processing_dcc_adapter is
generic (
-- DCC packet FIFO depth
Expand Down Expand Up @@ -748,6 +773,23 @@ package fofb_ctrl_pkg is
date => x"20230504",
name => "FOFB_SYS_ID_REGS ")));

-- FOFB shaper filters
constant c_xwb_fofb_shaper_filter_regs_sdb : t_sdb_device := (
abi_class => x"0000", -- undocumented device
abi_ver_major => x"01",
abi_ver_minor => x"00",
wbd_endian => c_sdb_endian_big,
wbd_width => x"4", -- 32-bit port granularity (0100)
sdb_component => (
addr_first => x"0000000000000000",
addr_last => x"000000000000FFFF",
product => (
vendor_id => x"1000000000001215", -- LNLS
device_id => x"f65559b2", -- Last 8 chars of "FOFB_SHAPER_REGS" md5sum
version => x"00000001",
date => x"20240419",
name => "FOFB_SHAPER_REGS ")));

end fofb_ctrl_pkg;

package body fofb_ctrl_pkg is
Expand Down
4 changes: 2 additions & 2 deletions hdl/modules/fofb_processing/dot_prod_pkg.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ package dot_prod_pkg is
type t_fofb_processing_sp_decim_arr is array (natural range <>) of signed(31 downto 0);
type t_fofb_processing_sp_decim_ratio_arr is array (natural range <>) of integer range 0 to c_FOFB_SP_DECIM_MAX_RATIO;

constant c_FOFB_GAIN_INT_WIDTH : natural := 3;
constant c_FOFB_GAIN_FRAC_WIDTH : natural := 12;
constant c_FOFB_GAIN_INT_WIDTH : natural := 0;
constant c_FOFB_GAIN_FRAC_WIDTH : natural := 15;
constant c_FOFB_GAIN_WIDTH : natural := c_FOFB_GAIN_INT_WIDTH + c_FOFB_GAIN_FRAC_WIDTH + 1;
constant c_FOFB_WB_GAIN_WIDTH : natural := 32;
type t_fofb_processing_gain_arr is array (natural range <>) of signed(c_FOFB_GAIN_WIDTH-1 downto 0);
Expand Down
11 changes: 6 additions & 5 deletions hdl/modules/fofb_processing/fofb_processing_channel.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,6 @@ begin
- g_COEFF_FRAC_WIDTH
- 1));

-- Cast gain_i to fixed point, assume the integer and fractionary parts to be
-- g_GAIN_INT_WIDTH and g_GAIN_FRAC_WIDTH respectively
gain <= sfixed(gain_i);

-- Set-point output is the accumulator value casted to signed
sp_o <= signed(to_slv(acc));

Expand All @@ -217,7 +213,7 @@ begin
g_B_INT_WIDTH => g_BPM_POS_INT_WIDTH,
g_B_FRAC_WIDTH => g_BPM_POS_FRAC_WIDTH,
g_ACC_EXTRA_WIDTH => g_DOT_PROD_ACC_EXTRA_WIDTH,
g_REG_INPUTS => false,
g_REG_INPUTS => true,
g_MULT_PIPELINE_STAGES => g_DOT_PROD_MUL_PIPELINE_STAGES,
g_ACC_PIPELINE_STAGES => g_DOT_PROD_ACC_PIPELINE_STAGES
)
Expand Down Expand Up @@ -249,6 +245,11 @@ begin
sp_filtered <= (others => '0');
sp_filtered_samples <= 0;
else

-- Cast gain_i to fixed point, assume the integer and fractionary parts to be
-- g_GAIN_INT_WIDTH and g_GAIN_FRAC_WIDTH respectively
gain <= sfixed(gain_i);

-- Delay 1 clock cycle to wait for the RAM data
dot_prod_valid <= bpm_pos_err_valid_i;
bpm_pos_err_fp <= sfixed(bpm_pos_err_i);
Expand Down
4 changes: 4 additions & 0 deletions hdl/modules/fofb_shaper_filt/Manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
files = [
"cheby/wb_fofb_shaper_filt_regs.vhd",
"xwb_fofb_shaper_filt.vhd"
]
4 changes: 4 additions & 0 deletions hdl/modules/fofb_shaper_filt/cheby/build_cheby.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

mkdir -p doc
cheby -i wb_fofb_shaper_filt_regs.cheby --hdl vhdl --gen-hdl wb_fofb_shaper_filt_regs.vhd --doc html --gen-doc doc/wb_fofb_shaper_filt_regs.html --gen-c wb_fofb_shaper_filt_regs.h --consts-style vhdl-ohwr --gen-consts ../../../sim/regs/wb_fofb_shaper_filt_regs_consts_pkg.vhd
Loading

0 comments on commit 6d2fc6a

Please sign in to comment.