Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/23/07 17:04
Read: times


 
#133570 - Changes to verilog code
Responding to: ???'s previous message
I think that this is a simpler decode:
assign addr[1:0] = {a1,a0};

// Read decodes
assign ctr0_rd     = !cs & !rd & (addr == 0);
assign ctr1_rd     = !cs & !rd & (addr == 1);
assign ctr2_rd     = !cs & !rd & (addr == 2);

// Write decodes
assign ctr0_wr     = !cs & !wr & (addr == 0);
assign ctr0_wr     = !cs & !wr & (addr == 1);
assign ctr0_wr     = !cs & !wr & (addr == 2);
assign creg_select = !cs & !wr & (addr == 3);
Also, it is unusual that you would assign read and write signals to be z. In real life, z signals always float to the exact state that you don't want. In the best case, you draw power. In the worst case, you may enable two different registers on an internal data bus, causing a conflict, and possibly destroying the chip.


List of 21 messages in thread
TopicAuthorDate
Simulation and Synthesis of verilog code            01/01/70 00:00      
   my comments on having a quick look            01/01/70 00:00      
      if..else...            01/01/70 00:00      
   Changes to verilog code            01/01/70 00:00      
      worst case??            01/01/70 00:00      
         Logical "Z" state, data buses, and more            01/01/70 00:00      
            Not sure what happens in verilog but vhdl            01/01/70 00:00      
               Verilog vs VHDL types            01/01/70 00:00      
            But in the 8254 datasheet,            01/01/70 00:00      
               More on Verilog data buses            01/01/70 00:00      
                  Thank you Lynn!            01/01/70 00:00      
                  XILILNX is the problem!            01/01/70 00:00      
                     Spartan II is just out of choices            01/01/70 00:00      
                        There are good reasons for Spartan-II            01/01/70 00:00      
                     Altera is doubly unhelpful            01/01/70 00:00      
   Where's the 805x?            01/01/70 00:00      
      well, he is fooling with a 8254            01/01/70 00:00      
      "chat forum"            01/01/70 00:00      
         Well, OK ...            01/01/70 00:00      
         how was I to know that?            01/01/70 00:00      
            mentioned in an earlier thread Erik.,            01/01/70 00:00      

Back to Subject List