##// END OF EJS Templates
Correction du generateur d'IRQ du WFP
pellion -
r234:7e0d5f5f88e7 LPP-LFR-em-WaveFormPicker-0-0-3 JC
parent child
Show More
@@ -490,7 +490,7 BEGIN
490 pirq_ms => 6,
490 pirq_ms => 6,
491 pirq_wfp => 14,
491 pirq_wfp => 14,
492 hindex => 2,
492 hindex => 2,
493 top_lfr_version => X"00000002")
493 top_lfr_version => X"00000003")
494 PORT MAP (
494 PORT MAP (
495 clk => clkm,
495 clk => clkm,
496 rstn => rstn,
496 rstn => rstn,
@@ -187,6 +187,16 ARCHITECTURE beh OF lpp_lfr_apbreg IS
187
187
188 SIGNAL prdata : STD_LOGIC_VECTOR(31 DOWNTO 0);
188 SIGNAL prdata : STD_LOGIC_VECTOR(31 DOWNTO 0);
189
189
190 -----------------------------------------------------------------------------
191 -- IRQ
192 -----------------------------------------------------------------------------
193 CONSTANT IRQ_WFP_SIZE : INTEGER := 12;
194 SIGNAL irq_wfp_ZERO : STD_LOGIC_VECTOR(IRQ_WFP_SIZE-1 DOWNTO 0);
195 SIGNAL irq_wfp_reg_s : STD_LOGIC_VECTOR(IRQ_WFP_SIZE-1 DOWNTO 0);
196 SIGNAL irq_wfp_reg : STD_LOGIC_VECTOR(IRQ_WFP_SIZE-1 DOWNTO 0);
197 SIGNAL irq_wfp : STD_LOGIC_VECTOR(IRQ_WFP_SIZE-1 DOWNTO 0);
198 SIGNAL ored_irq_wfp : STD_LOGIC;
199
190 BEGIN -- beh
200 BEGIN -- beh
191
201
192 status_ready_matrix_f0_0 <= reg_sp.status_ready_matrix_f0_0;
202 status_ready_matrix_f0_0 <= reg_sp.status_ready_matrix_f0_0;
@@ -424,12 +434,12 BEGIN -- beh
424 error_bad_component_error)
434 error_bad_component_error)
425 ));
435 ));
426
436
427 apbo.pirq(pirq_wfp) <= (status_full(0) OR status_full_err(0) OR status_new_err(0) OR
437 --apbo.pirq(pirq_wfp) <= (status_full(0) OR status_full_err(0) OR status_new_err(0) OR
428 status_full(1) OR status_full_err(1) OR status_new_err(1) OR
438 -- status_full(1) OR status_full_err(1) OR status_new_err(1) OR
429 status_full(2) OR status_full_err(2) OR status_new_err(2) OR
439 -- status_full(2) OR status_full_err(2) OR status_new_err(2) OR
430 status_full(3) OR status_full_err(3) OR status_new_err(3)
440 -- status_full(3) OR status_full_err(3) OR status_new_err(3)
431 );
441 -- );
432
442 apbo.pirq(pirq_wfp) <= ored_irq_wfp;
433
443
434 END IF;
444 END IF;
435 END PROCESS lpp_lfr_apbreg;
445 END PROCESS lpp_lfr_apbreg;
@@ -438,5 +448,25 BEGIN -- beh
438 apbo.pconfig <= pconfig;
448 apbo.pconfig <= pconfig;
439 apbo.prdata <= prdata;
449 apbo.prdata <= prdata;
440
450
451 -----------------------------------------------------------------------------
452 -- IRQ
453 -----------------------------------------------------------------------------
454 irq_wfp_reg_s <= status_full & status_full_err & status_new_err;
455
456 PROCESS (HCLK, HRESETn)
457 BEGIN -- PROCESS
458 IF HRESETn = '0' THEN -- asynchronous reset (active low)
459 irq_wfp_reg <= (OTHERS => '0');
460 ELSIF HCLK'event AND HCLK = '1' THEN -- rising clock edge
461 irq_wfp_reg <= irq_wfp_reg_s;
462 END IF;
463 END PROCESS;
441
464
465 all_irq_wfp: FOR I IN IRQ_WFP_SIZE-1 DOWNTO 0 GENERATE
466 irq_wfp(I) <= (NOT irq_wfp_reg(I)) AND irq_wfp_reg_s(I);
467 END GENERATE all_irq_wfp;
468
469 irq_wfp_ZERO <= (OTHERS => '0');
470 ored_irq_wfp <= '0' WHEN irq_wfp = irq_wfp_ZERO ELSE '1';
471
442 END beh;
472 END beh;
General Comments 0
You need to be logged in to leave comments. Login now