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