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