Tesi Robotica Un co-processore per Stereo-Matching: Architettura | Page 35
i
i
“LP_Tesi” — 2011/9/9 — 21:20 — page 35 — #35
i
2.2. LIBRERIE UTILIZZATE
i
35
Algoritmo 2.5 Interfaccia BRAM_PORT
1
2
3
4
interface BRAM_PORT#(type addr, type data);
method Action put (Bool b, addr a, data d);
method data read();
endinterface
Se nel ciclo di clock precedente è stata effettuata una richiesta di lettura del
tipo:
1
ram.a.put(False, addr, 0);
allora è possibile chiamare il metodo read:
1
Reg#(type) x <= ram.a.read();
che non fa altro che accedere alla risorsa poco prima richiesta. Da tenere bene
a mente che ogni porta è indipendente dall’altra e che quindi una richiesta di
lettura sulla porta a non potrà essere seguita da una lettura effettiva sulla porta
b.
i
i
i
i