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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/12/07 06:03
Read: times


 
#130707 - details
Responding to: ???'s previous message
Andy Peters said:

You could also do the whole thing in an always block. Just don't string everything along in one huge messy line. If I was reviewing your code, I'd bounce it back.

Thanks for giving those corrections Andy.
Actually i am going on with implementing 8254 Interval Timer using Verilog.
The code sample i posted here is to perform data transfer between the 8 bit Internal bus(bf_out) and a counter block.
Since the internal bus(bf_out) is bidirectional(inout) i couldnt use it within "always" statement.
The figure below shows the internal block diagram of the counter.



So the problem i have is,

When "ctrl_data[5:4] == 2'b11" //control reg value that says R/W MSB first then LSB.

-For Read Operations (i.e.,if ctr0_RW == 1'b0),

i need to read OLm(8 bit) first then OLl(8 bit) through the bus (bf_out)
I have done this as below.
assign bf_out[7:0] = (ctr0_select == 1'b1 && ctr0_RW == 1'b0)?(temp_bus[7:0]:8'bXXXXXXXX);

Comment: temp_bus is a temporary register i use to which OLm and OLl values are sent using an always statement when a "ctrl_data[5:4] == 2'b11" and a read signal(ctr0_RW = 1'b0) is encounterd.

But for write operations,
i.e.,when "ctrl_data[5:4] == 2'b11" and ctr0_RW == 1'b1.,
i need to load MSB in CRm(8 bit) and LSB in CRl(8 bit)
i couldnt find a better idea to perform it since internal bus(bf_out) is a "net".

Can i get some suggestions in it.
I also welcome any better ideas.

regard's
Suresh.



List of 28 messages in thread
TopicAuthorDate
data flow modeling in Verilog            01/01/70 00:00      
   How to post code            01/01/70 00:00      
   proper code...            01/01/70 00:00      
      Break up your code into smaller pieces            01/01/70 00:00      
         Thanks            01/01/70 00:00      
         what does that have to do with verilog? :)            01/01/70 00:00      
      Verilog bites like C            01/01/70 00:00      
         yes sorry. i made a mistake there.            01/01/70 00:00      
      ugh            01/01/70 00:00      
         details            01/01/70 00:00      
            dont use a bidirectional bus            01/01/70 00:00      
               regarding using seperate buses..            01/01/70 00:00      
                  out signal to status register            01/01/70 00:00      
                     hints            01/01/70 00:00      
                        Absolutely.            01/01/70 00:00      
                        Since \'diomux\' is a register....            01/01/70 00:00      
                           re: Since 'diomux' is a register ...            01/01/70 00:00      
                              regarding write and read operations...            01/01/70 00:00      
                                 re: regarding write and read ops            01/01/70 00:00      
                                    thank you..            01/01/70 00:00      
   Yukky verilog            01/01/70 00:00      
      Yes i did            01/01/70 00:00      
   all you do is...            01/01/70 00:00      
       can i do like this.,            01/01/70 00:00      
         if it's in BUFFER mode ...            01/01/70 00:00      
            buffer mode ports from the vhdl faq            01/01/70 00:00      
         mode out on RHS            01/01/70 00:00      
            very good Solutions!            01/01/70 00:00      

Back to Subject List