URL
https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk
Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc
Compare Revisions
- This comparison shows the changes necessary to convert path
/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk/mpsoc/src_c/jtag/jtag_quartus_stp
- from Rev 43 to Rev 45
- ↔ Reverse comparison
Rev 43 → Rev 45
/jtag.c
245,6 → 245,16
//printf("%s",s); |
} |
|
|
void clean_stp_buff (){ |
char buf[1024]; |
fflush(to_stp); |
fgets(buf, sizeof(buf), from_stp); |
//printf("%s\n",buf); |
} |
|
|
|
char * read_stp (){ |
char buf[1024]; |
char * result=NULL; |
324,13 → 334,19
hextostring( hexstring, &bits, 1, sz ); |
if (!out){ |
fprintf(to_stp,"device_lock -timeout 10000\n"); |
|
fprintf(to_stp,"device_virtual_dr_shift -dr_value %s -instance_index %d -length %d -no_captured_dr_value -value_in_hex\n", hexstring,index_num,sz); |
|
//printf("device_virtual_dr_shift -dr_value %s -instance_index %d -length %d -no_captured_dr_value -value_in_hex\n",hexstring,index_num,sz); |
fprintf(to_stp,"catch {device_unlock}\n"); |
clean_stp_buff(); |
//fflush(to_stp); |
}else{ |
fprintf(to_stp,"device_lock -timeout 10000\n"); |
|
fprintf(to_stp,"set data [device_virtual_dr_shift -dr_value %s -instance_index %d -length %d -value_in_hex]\n", hexstring,index_num,sz); |
fprintf(to_stp,"catch {device_unlock}\n"); |
|
fprintf(to_stp,"catch {device_unlock}\n"); |
return_dr (out); |
} |
} |
346,6 → 362,7
//printf("device_virtual_dr_shift -dr_value %s -instance_index %d -length %d -no_captured_dr_value -value_in_hex\n",hexstring,index_num,sz); |
|
fprintf(to_stp,"catch {device_unlock}\n"); |
clean_stp_buff(); |
}else{ |
fprintf(to_stp,"device_lock -timeout 10000\n"); |
fprintf(to_stp,"set data [device_virtual_dr_shift -dr_value %s -instance_index %d -length %d -value_in_hex]\n",hexstring,index_num,sz); |
/jtag_quartus_stp.c
314,6 → 314,7
jtag_vdr(BIT_NUM, 0x1, &out); |
jtag_vir(UPDATE_WB_ADDR); |
|
printf("cpu is disabled.\n"); |
|
// change memory sizes from byte to word |
memory_offset_in_word=memory_offset /BYTE_NUM; |
324,7 → 325,7
jtag_vir(UPDATE_WB_WR_DATA); |
|
printf ("start programing\n"); |
//printf ("num=%d\n",num); |
printf ("Will send %d values to memory\n",num); |
for(i=0;i<num;i++){ |
//printf("%d:%x\n",i,buffer[i]); |
|
340,7 → 341,7
} |
} |
|
//printf ("done programing\n"); |
printf ("done programing\n"); |
if(write_verify){ |
if(!(fp = fopen(binary_file_name,"rb"))){ |
fprintf (stderr,"Error: can not open %s file in read mode\n",binary_file_name); |