Witam. Mam pytanie do Kolegów rzeźbiących w FPGA Xilinxa. Próbuję wykombinować loader umożliwiający mi za pośrednictwem JTAG-a wrzucenie danych do wewnętrznej pamieci BlockRAM w FPGA. Poniżej fragment opisujący obsługę sygnałów z BSCAN
reg [31:0] JTAG_SR; reg [31:0] JTAG_OUT; BSCAN_SPARTAN3 BSCAN_SPARTAN3_inst ( .CAPTURE(BS_CAPTURE), // CAPTURE output from TAP controller .DRCK2(BS_DRCK2), // Data register output for USER2 functions .SEL2(BS_SEL2), // USER2 active output .SHIFT(BS_SHIFT), // SHIFT output from TAP controller .TDI(BS_TDI), // TDI output from TAP controller .UPDATE(BS_UPDATE), // UPDATE output from TAP controller .TDO2(JTAG_SR[0]) // Data input for USER2 function );
always @(posedge BS_DRCK2) begin if(BS_SHIFT) begin JTAG_SR <= {BS_TDI, JTAG_SR[31:1]}; end end
always @(posedge BS_UPDATE) begin if(BS_SEL2) begin JTAG_OUT <= JTAG_SR; end end
=====
Próbuję to potraktować za pośrednictwem programu iMPACT w trybie wsadowym. Wsad wygląda tak (w łańcuchu JTAG mam jeszcze pamięć konfiguracyjną)
setMode -bs setCable -port auto
bsdebug -start bsdebug -reset
# pamięć na BYPASS, FPGA na USER2 bsdebug -scanir 11111111000011 -irlength 14
# dane do przeslania, pierwszy bit to BYPASS pamieci konfiguracyjnej bsdebug -scandr 000000000000000000000111100001111 -drlength 33 bsdebug -scandr 000000000000000010000011111101100 -drlength 33 bsdebug -scandr 000000000000000100000111100001111 -drlength 33 bsdebug -scandr 000000000000000110000011001101010 -drlength 33 bsdebug -scandr 000000000000001000000111100001111 -drlength 33 bsdebug -scandr 000000000000001010000011010000001 -drlength 33 bsdebug -scandr 000000000000001100000111100001111 -drlength 33 bsdebug -scandr 000000000000001110000011010000110 -drlength 33 bsdebug -scandr 000000000000010000000111100001111 -drlength 33 bsdebug -scandr 000000000000010010000011010001011 -drlength 33 bsdebug -scandr 000000000000010100000111100001111 -drlength 33 bsdebug -scandr 000000000000010110000011010010000 -drlength 33 bsdebug -scandr 000000000000011000000111100001111 -drlength 33 bsdebug -scandr 000000000000011010000011010011000 -drlength 33 bsdebug -scandr 000000000000011100000111100001111 -drlength 33 bsdebug -scandr 000000000000011110000011011011111 -drlength 33 bsdebug -scandr 000000000000100001010000111111111 -drlength 33 bsdebug -scandr 000000000000100011101000100010000 -drlength 33 bsdebug -scandr 000000000000100100111000000110000 -drlength 33 bsdebug -scandr 000000000000100111100000100000001 -drlength 33 ... duuuuuuużo linijek z scandr bsdebug -scandr 000001111111110110000000000000000 -drlength 33 bsdebug -scandr 000001111111111000000000000000000 -drlength 33 bsdebug -scandr 000001111111111010000000000000000 -drlength 33 bsdebug -scandr 000001111111111100000000000000000 -drlength 33 bsdebug -scandr 000001111111111110000000000000000 -drlength 33
bsdebug -stop closeCable quit
=======
Programator USB DLC9G. Robię kilka prób z tym samym plikiem wsadowym. Czasem to zadziała (zwłaszcza jak jest niewiele linii bsdebug -scandr), ale najczęściej przejdzie kilkadziesiąt pierwszych słów 32-bitowych i przestają się pojawiać sygnały DRCK2 i UPDATE. Często dochodzi do resetu układu lub niekiedy nawet jego przeprogramowania.
P.S. Na tym samym sprzęcie (komputer/programator/Xilinx) układ FPGA poprawnie przyjmuje "wsad" przez JTAG-a.