Enable Spartan 6 JTAG TAP only if selected (Michael Walle)

Sun, 06 Mar 2011 19:49:17 +0000

author
Philip Pemberton <philpem@philpem.me.uk>
date
Sun, 06 Mar 2011 19:49:17 +0000
changeset 17
50bf3061dbff
parent 16
5fb37de64edc
child 18
cc945f778cd7

Enable Spartan 6 JTAG TAP only if selected (Michael Walle)

Original-Author: Michael Walle <michael walle.cc>
Original-Source: milkymist e7d77749236d73fcdc65

jtag_cores.v file | annotate | diff | revisions
jtag_tap_spartan6.v file | annotate | diff | revisions
     1.1 diff -r 5fb37de64edc -r 50bf3061dbff jtag_cores.v
     1.2 --- a/jtag_cores.v	Sun Mar 06 19:48:34 2011 +0000
     1.3 +++ b/jtag_cores.v	Sun Mar 06 19:49:17 2011 +0000
     1.4 @@ -8,7 +8,6 @@
     1.5      output jrstn
     1.6  );
     1.7  
     1.8 -wire sel;
     1.9  wire tck;
    1.10  wire tdi;
    1.11  wire tdo;
    1.12 @@ -17,7 +16,6 @@
    1.13  wire reset;
    1.14  
    1.15  jtag_tap jtag_tap (
    1.16 -	.sel(sel),
    1.17  	.tck(tck),
    1.18  	.tdi(tdi),
    1.19  	.tdo(tdo),
    1.20 @@ -51,7 +49,7 @@
    1.21  		jtag_latched <= jtag_shift;
    1.22  end
    1.23  
    1.24 -assign reg_update = update & sel;
    1.25 +assign reg_update = update;
    1.26  assign reg_q = jtag_latched[10:3];
    1.27  assign reg_addr_q = jtag_latched[2:0];
    1.28  assign jtck = tck;
     2.1 diff -r 5fb37de64edc -r 50bf3061dbff jtag_tap_spartan6.v
     2.2 --- a/jtag_tap_spartan6.v	Sun Mar 06 19:48:34 2011 +0000
     2.3 +++ b/jtag_tap_spartan6.v	Sun Mar 06 19:49:17 2011 +0000
     2.4 @@ -1,6 +1,5 @@
     2.5  
     2.6  module jtag_tap(
     2.7 -	output sel,
     2.8  	output tck,
     2.9  	output tdi,
    2.10  	input tdo,
    2.11 @@ -9,6 +8,12 @@
    2.12  	output reset
    2.13  );
    2.14  
    2.15 +wire g_shift;
    2.16 +wire g_update;
    2.17 +
    2.18 +assign shift = g_shift & sel;
    2.19 +assign update = g_update & sel;
    2.20 +
    2.21  BSCAN_SPARTAN6 #(
    2.22  	.JTAG_CHAIN(1)
    2.23  ) bscan (
    2.24 @@ -17,11 +22,11 @@
    2.25  	.RESET(reset),
    2.26  	.RUNTEST(),
    2.27  	.SEL(sel),
    2.28 -	.SHIFT(shift),
    2.29 +	.SHIFT(g_shift),
    2.30  	.TCK(),
    2.31  	.TDI(tdi),
    2.32  	.TMS(),
    2.33 -	.UPDATE(update),
    2.34 +	.UPDATE(g_update),
    2.35  	.TDO(tdo)
    2.36  );
    2.37