Shop OBEX P1 Docs P2 Docs Learn Events
!nres — Parallax Forums

!nres

rjo__rjo__ Posts: 2,114
edited 2014-08-27 17:34 in Propeller 1
In dig.v (for nano) in the most recent release, at line 64:
// bus select

reg [7:0] bus_sel;

always @(posedge clk_cog or negedge nres)
if (!nres)
	bus_sel <= 8'b0;
else if (ena_bus)
	bus_sel <= {4'b0,bus_sel[2:0], ~|bus_sel[2:0]};

nres is active low... so presumably !nres means that nres is high and of no effect... that being the case, to my eye, when there is no reset active then the bus selection defaults to 8'bO;

I don't understand how this could be.


Thanks,

Rich

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2014-08-27 17:19
    Nres is active low is reset. But in verilog this is just a name, so a statement using "if nres..." Means if nres == 1.
    So !nres means to verilog if this is low. Hence the line is if !nres==0 the the bus is 000's
  • rjo__rjo__ Posts: 2,114
    edited 2014-08-27 17:34
    Wow.......That fits with line 49 also.... unfortunately, I completely misread line 49:)

    There is a dialog from Moneyball...but I can't find it online. It's about how easy it is to play first base. If anyone can find it... this would be an appropriate place to post it:)
Sign In or Register to comment.