Oh, jetzt sehe ich das erst...
Das ist eine böse Beschreibung:
1 | if reset='0' then bufPA<=(others=>'0');
|
2 | elsif ...
|
3 | :
|
4 | if e'event and e='0' then bufPA(i)<=DB(i); end if;
|
5 | :
|
6 | if e'event and e='1' then bufPA(i)<=PA(i); DB_PA(i)<=PA(i); end if;
|
7 | :
|
8 | end if;
|
9 | END PROCESS;
|
Mit diesen 2 Zeilen werden FF beschrieben, die sowohl mit der steigenden
wie auch der fallenden Flanke Daten übernehmen können. Sowas gibt es
bestenfalls in den IO-Zellen eines FPGAs (DDR-Interface). Und das ist
ziemlich durchgängig so beschreiben... :-o
Probier das doch mal, indem du alle 'event rausnimmst, und alles über
Latches abhandelst.
Z.B. vorher:
1 | if (reset='0') or (mpu_readA='1') then irqaf1_1<='0'; irqaf1_2<='0';
|
2 | elsif CRA(5)='0' and CRA(4)='0' then -- the latch for the CA2 is from high to low
|
3 | if CA2'event and CA2='0' then irqaf2_1<='1'; end if;
|
4 | elsif CRA(5)='0' and CRA(4)='1' then -- the latch for the CA2 is from low to high
|
5 | if CA2'event and CA2='1' then irqaf2_2<='1'; end if;
|
6 | end if;
|
Nachher:
1 | if (reset='0') or (mpu_readA='1') then irqaf1_1<='0'; irqaf1_2<='0';
|
2 | elsif CRA(5)='0' and CRA(4)='0' then -- the latch for the CA2 is from high to low
|
3 | if CA2='0' then irqaf2_1<='1'; end if;
|
4 | elsif CRA(5)='0' and CRA(4)='1' then -- the latch for the CA2 is from low to high
|
5 | if CA2='1' then irqaf2_2<='1'; end if;
|
6 | end if;
|
Dann passt auch wieder der Kommentar:
-- the latch for the CA2
Aber "schön" geht anders...