diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-11-20 10:26:29 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-11-20 10:26:29 -0600 |
commit | f0c477eef466d0fbf47ecd92161c38ae474aa9ae (patch) | |
tree | dddf45e3caae4864f70fcaa26ca91a6d1845098d /fpga/xilinx/programmer | |
parent | d94bf35fe7f2c30c5ea333eb0c97c20f29da089a (diff) | |
download | ulab-f0c477eef466d0fbf47ecd92161c38ae474aa9ae.tar.gz ulab-f0c477eef466d0fbf47ecd92161c38ae474aa9ae.zip |
Add magic 64 bytes to S6 svf file
Diffstat (limited to 'fpga/xilinx/programmer')
-rw-r--r-- | fpga/xilinx/programmer/bit2svf/commands.c | 27 | ||||
-rw-r--r-- | fpga/xilinx/programmer/bit2svf/templates/alg_Spartan_6.svft | 2 |
2 files changed, 27 insertions, 2 deletions
diff --git a/fpga/xilinx/programmer/bit2svf/commands.c b/fpga/xilinx/programmer/bit2svf/commands.c index c4a9493..bddeec4 100644 --- a/fpga/xilinx/programmer/bit2svf/commands.c +++ b/fpga/xilinx/programmer/bit2svf/commands.c @@ -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�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")) { diff --git a/fpga/xilinx/programmer/bit2svf/templates/alg_Spartan_6.svft b/fpga/xilinx/programmer/bit2svf/templates/alg_Spartan_6.svft index 5e64c24..b177a02 100644 --- a/fpga/xilinx/programmer/bit2svf/templates/alg_Spartan_6.svft +++ b/fpga/xilinx/programmer/bit2svf/templates/alg_Spartan_6.svft @@ -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; |