##// END OF EJS Templates
save
pellion -
r630:1f7134b6f926 simu_with_Leon3
parent child
Show More
@@ -425,7 +425,7 BEGIN -- beh
425 pirq_ms => 6,
425 pirq_ms => 6,
426 pirq_wfp => 14,
426 pirq_wfp => 14,
427 hindex => 2,
427 hindex => 2,
428 top_lfr_version => X"010158", -- aa.bb.cc version
428 top_lfr_version => X"010159", -- aa.bb.cc version
429 -- AA : BOARD NUMBER
429 -- AA : BOARD NUMBER
430 -- 0 => MINI_LFR
430 -- 0 => MINI_LFR
431 -- 1 => EM
431 -- 1 => EM
@@ -34,7 +34,7 ENTITY WF_processing IS
34 GENERIC (
34 GENERIC (
35 SIZE_DATA : INTEGER := 16;
35 SIZE_DATA : INTEGER := 16;
36 SIZE_PARAM : INTEGER := 10;
36 SIZE_PARAM : INTEGER := 10;
37 NB_POINT_BY_WINDOW : INTEGER := 256
37 NB_POINT_BY_WINDOW : INTEGER := 256
38 );
38 );
39
39
40 PORT (
40 PORT (
@@ -51,7 +51,8 ENTITY WF_processing IS
51
51
52 --window parameter interface
52 --window parameter interface
53 param_in : IN STD_LOGIC_VECTOR(SIZE_PARAM-1 DOWNTO 0);
53 param_in : IN STD_LOGIC_VECTOR(SIZE_PARAM-1 DOWNTO 0);
54 param_index : OUT INTEGER RANGE 0 TO NB_POINT_BY_WINDOW-1
54 param_index : OUT INTEGER RANGE 0 TO NB_POINT_BY_WINDOW-1;
55 PARAM_ALL_POSITIVE : IN STD_LOGIC
55 );
56 );
56
57
57 END WF_processing;
58 END WF_processing;
@@ -93,8 +94,10 BEGIN
93 OP2 => param_in,
94 OP2 => param_in,
94
95
95 RES => data_x_param);
96 RES => data_x_param);
96
97
97 data_out <= data_x_param(SIZE_DATA + SIZE_PARAM-1 DOWNTO SIZE_PARAM);
98 data_out <= data_x_param(SIZE_DATA + SIZE_PARAM-2 DOWNTO SIZE_PARAM-1) WHEN PARAM_ALL_POSITIVE = '1' ELSE
99 data_x_param(SIZE_DATA + SIZE_PARAM-1 DOWNTO SIZE_PARAM);
100
98
101
99 WINDOWS_REG: SYNC_FF
102 WINDOWS_REG: SYNC_FF
100 GENERIC MAP (
103 GENERIC MAP (
@@ -105,4 +108,4 BEGIN
105 A => data_in_valid,
108 A => data_in_valid,
106 A_sync => data_out_valid);
109 A_sync => data_out_valid);
107
110
108 END beh;
111 END beh; No newline at end of file
@@ -36,7 +36,8 ENTITY WF_rom IS
36 );
36 );
37 PORT (
37 PORT (
38 data : OUT STD_LOGIC_VECTOR(SIZE_PARAM-1 DOWNTO 0);
38 data : OUT STD_LOGIC_VECTOR(SIZE_PARAM-1 DOWNTO 0);
39 index : IN INTEGER RANGE 0 TO NB_POINT_BY_WINDOW-1
39 index : IN INTEGER RANGE 0 TO NB_POINT_BY_WINDOW-1 ;
40 PARAM_ALL_POSITIVE : OUT STD_LOGIC
40 );
41 );
41 END WF_rom;
42 END WF_rom;
42
43
@@ -82,6 +83,8 ARCHITECTURE beh OF WF_rom IS
82 SIGNAL data_selected : STD_LOGIC_VECTOR(SIZE_ARRAY_PARAM-1 DOWNTO 0);
83 SIGNAL data_selected : STD_LOGIC_VECTOR(SIZE_ARRAY_PARAM-1 DOWNTO 0);
83 BEGIN
84 BEGIN
84
85
86 PARAM_ALL_POSITIVE <= '1';
87
85 ALL_PARAM_DEFINE: IF NB_POINT_BY_WINDOW < SIZE_ARRAY + 1 GENERATE
88 ALL_PARAM_DEFINE: IF NB_POINT_BY_WINDOW < SIZE_ARRAY + 1 GENERATE
86 data_selected <= ROM_array(index);
89 data_selected <= ROM_array(index);
87 END GENERATE ALL_PARAM_DEFINE;
90 END GENERATE ALL_PARAM_DEFINE;
@@ -93,4 +96,4 BEGIN
93
96
94 data <= data_selected(SIZE_ARRAY_PARAM-1 DOWNTO SIZE_ARRAY_PARAM-SIZE_PARAM);
97 data <= data_selected(SIZE_ARRAY_PARAM-1 DOWNTO SIZE_ARRAY_PARAM-SIZE_PARAM);
95
98
96 END beh;
99 END beh; No newline at end of file
@@ -55,6 +55,8 ARCHITECTURE beh OF window_function IS
55 SIGNAL param_in : STD_LOGIC_VECTOR(SIZE_PARAM-1 DOWNTO 0);
55 SIGNAL param_in : STD_LOGIC_VECTOR(SIZE_PARAM-1 DOWNTO 0);
56 SIGNAL param_index : INTEGER RANGE 0 TO NB_POINT_BY_WINDOW-1;
56 SIGNAL param_index : INTEGER RANGE 0 TO NB_POINT_BY_WINDOW-1;
57
57
58 SIGNAL PARAM_ALL_POSITIVE : STD_LOGIC;
59
58 BEGIN
60 BEGIN
59
61
60 WF_rom_1: WF_rom
62 WF_rom_1: WF_rom
@@ -62,8 +64,9 BEGIN
62 SIZE_PARAM => SIZE_PARAM,
64 SIZE_PARAM => SIZE_PARAM,
63 NB_POINT_BY_WINDOW => NB_POINT_BY_WINDOW)
65 NB_POINT_BY_WINDOW => NB_POINT_BY_WINDOW)
64 PORT MAP (
66 PORT MAP (
65 data => param_in,
67 data => param_in,
66 index => param_index);
68 index => param_index,
69 PARAM_ALL_POSITIVE => PARAM_ALL_POSITIVE );
67
70
68 WF_processing_1: WF_processing
71 WF_processing_1: WF_processing
69 GENERIC MAP (
72 GENERIC MAP (
@@ -79,6 +82,7 BEGIN
79 data_out => data_out,
82 data_out => data_out,
80 data_out_valid => data_out_valid,
83 data_out_valid => data_out_valid,
81 param_in => param_in,
84 param_in => param_in,
82 param_index => param_index);
85 param_index => param_index,
86 PARAM_ALL_POSITIVE => PARAM_ALL_POSITIVE );
83
87
84 END beh;
88 END beh; No newline at end of file
@@ -56,7 +56,8 PACKAGE window_function_pkg IS
56 data_out : OUT STD_LOGIC_VECTOR(SIZE_DATA-1 DOWNTO 0);
56 data_out : OUT STD_LOGIC_VECTOR(SIZE_DATA-1 DOWNTO 0);
57 data_out_valid : OUT STD_LOGIC;
57 data_out_valid : OUT STD_LOGIC;
58 param_in : IN STD_LOGIC_VECTOR(SIZE_PARAM-1 DOWNTO 0);
58 param_in : IN STD_LOGIC_VECTOR(SIZE_PARAM-1 DOWNTO 0);
59 param_index : OUT INTEGER RANGE 0 TO NB_POINT_BY_WINDOW-1
59 param_index : OUT INTEGER RANGE 0 TO NB_POINT_BY_WINDOW-1;
60 PARAM_ALL_POSITIVE : IN STD_LOGIC
60 );
61 );
61 END COMPONENT;
62 END COMPONENT;
62
63
@@ -66,7 +67,8 PACKAGE window_function_pkg IS
66 NB_POINT_BY_WINDOW : INTEGER);
67 NB_POINT_BY_WINDOW : INTEGER);
67 PORT (
68 PORT (
68 data : OUT STD_LOGIC_VECTOR(SIZE_PARAM-1 DOWNTO 0);
69 data : OUT STD_LOGIC_VECTOR(SIZE_PARAM-1 DOWNTO 0);
69 index : IN INTEGER RANGE 0 TO NB_POINT_BY_WINDOW-1);
70 index : IN INTEGER RANGE 0 TO NB_POINT_BY_WINDOW-1;
71 PARAM_ALL_POSITIVE : OUT STD_LOGIC);
70 END COMPONENT;
72 END COMPONENT;
71
73
72 END window_function_pkg;
74 END window_function_pkg;
General Comments 0
You need to be logged in to leave comments. Login now