Add magic 64 bytes to S6 svf file

master
Timothy Pearson 12 years ago
parent d94bf35fe7
commit f0c477eef4

@ -2,7 +2,8 @@
Copyright (c) 2005 Juan Pablo D. Borgna <jpborgna en inti gov ar>
Copyright (c) 2006-2007 Salvador E. Tropea <salvador en inti gov ar>
Copyright (c) 2005-2007 Instituto Nacional de Tecnología Industrial
Copyright (c) 2005-2007 Instituto Nacional de Tecnolog<EFBFBD>a Industrial
Copyright (c) 2012 Timothy Pearson <kb9vqf@pearsoncomputing.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -276,6 +277,30 @@ do_command(char *cmd, FILE *dfp, FILE *ofp, int *col)
}
/* end SBITS command */
/* SADDBITS command */
if (strstr(cmd,"SADDBITS"))
{
/* get the args inside the () */
args_pos_s=strchr(cmd,'(');
args_pos_e=strchr(cmd,')');
if((!args_pos_s && args_pos_e )|| (!args_pos_e && args_pos_s))
{
fprintf(stderr,"Bad argument specification in $SADDBITS(VAL)$\n");
return 1;
}
if (!args_pos_s && !args_pos_e)
{
fprintf(stderr,"Bad argument specification in $SADDBITS(VAL)$\n");
return 1;
}
memcpy(args,args_pos_s+1,(size_t)(args_pos_e-args_pos_s)); /* Copy the argument */
args[args_pos_e-args_pos_s-1]='\0'; /* Put the null terminator */
value=value_from(args);
*col+=fprintf(ofp,"%d",(unsigned int)(s_bits+value));
return 0;
}
/* end SADDBITS command */
/* SBYTES command */
if (strstr(cmd,"SBYTES"))
{

@ -49,7 +49,7 @@ STATE RESET;
SIR 6 TDI (05) ;
SDR 32 TDI (00000000) SMASK (ffffffff) ;
SIR 6 TDI (05) TDO (00) MASK (00) ;
SDR $SBITS$ TDI ($DATA_INV(-1)$) SMASK ($FILL(0xFF,-1)$);
SDR $SADDBITS(64)$ TDI ($DATA_INV(-1)$000000001000850c) SMASK ($FILL(0xFF,-1)$ffffffffffffffff) ;
// Loading device with a `jstart` instruction.
SIR 6 TDI (0c) ;
RUNTEST 24 TCK;

Loading…
Cancel
Save