OpenCores
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

[/] [an-fpga-implementation-of-low-latency-noc-based-mpsoc/] [trunk/] [mpsoc/] [src_c/] [jtag/] [jtag_quartus_stp/] [jtag.c] - Diff between revs 43 and 45

Show entire file | Details | Blame | View Log

Rev 43 Rev 45
Line 243... Line 243...
           i++;
           i++;
     }
     }
          //printf("%s",s);
          //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 * read_stp (){
        char buf[1024];
        char buf[1024];
        char * result=NULL;
        char * result=NULL;
        char * ptr;
        char * ptr;
        fflush(to_stp);
        fflush(to_stp);
Line 322... Line 332...
        char hexstring[1000];
        char hexstring[1000];
 
 
        hextostring( hexstring, &bits,  1, sz );
        hextostring( hexstring, &bits,  1, sz );
        if (!out){
        if (!out){
                fprintf(to_stp,"device_lock -timeout 10000\n");
                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);
                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);
                //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");
                fprintf(to_stp,"catch {device_unlock}\n");
 
                clean_stp_buff();
 
//fflush(to_stp);
        }else{
        }else{
                fprintf(to_stp,"device_lock -timeout 10000\n");
                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,"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);
                return_dr (out);
        }
        }
}
}
 
 
Line 344... Line 360...
                fprintf(to_stp,"device_lock -timeout 10000\n");
                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);
                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);
                //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");
                fprintf(to_stp,"catch {device_unlock}\n");
 
                clean_stp_buff();
        }else{
        }else{
                fprintf(to_stp,"device_lock -timeout 10000\n");
                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,"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_long (out,words);
                return_dr_long (out,words);

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.