Tesi Robotica Un co-processore per Stereo-Matching: Architettura | Page 78

i i “LP_Tesi” — 2011/9/9 — 21:20 — page 78 — #78 i 4.5. MODULO SCORING i 78 preDir: registro che contiene la direzione precedente presa durante il backtracking; Algoritmo 4.20 Scoring: storage 1 2 BitF size = fromInteger(width); Bit#(32) gap=69, egap=98, bound=255; 3 4 5 6 7 BRAM_DUAL_PORT#(BitF, False); BRAM_DUAL_PORT#(BitF, False); BRAM_DUAL_PORT#(BitF, False); BRAM_DUAL_PORT#(BitF, ); Bit#(32)) score <- mkBRAMCore2(width*width, Bit#(1)) gapNorth <- mkBRAMCore2(width*width, Bit#(1)) gapWest <- mkBRAMCore2(width*width, Bit#(1)) diag <- mkBRAMCore2(width*width, False 8 9 FIFOF#(DirAddr) fout <- mkSizedFIFOF(width); 10 11 12 13 14 15 16 RegBitF addr <- mkReg(0); Reg#(Bit#(3)) step <- mkReg(1); Reg#(Bit#(32)) west <- mkReg(0); Reg#(Bit#(32)) top <- mkReg(gap); Reg#(Bit#(32)) left <- mkReg(gap); Reg#(Channel) preDir <- mkReg(RED); Passando ora all’implementazione vera e proprio c’è da dire che la computazione avviene in due fasi ben distinte, in una prima fase c’è il riempimento della matrice dei punt Vvv