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 11:45
Read: times


 
#130715 - regarding using seperate buses..
Responding to: ???'s previous message
Jez Smith said:

ts always a bad idea to use bidirectional busses internaly to a design.Its much better to have two seperate busses and to merge them together at a higher level.

I got the method you described jez.
and willing to know regarding using seperate buses..

entity counter_load is

port ( bf_in : in std_logic_vector(7 downto 0); -- data bus in
       bf_out: out std_logic_vector(7 downto 0); -- data bus out
       ctr0_rw: in std_logic;
          .
          .
          .
)end counter_load

As you are trying to load a 16 bit value into an 8 bit bus you need to split it over two phases.Something like

        if rising edge(clk)  then
         if ctr0_RW='1' then
             if done='0' then

                if high_byte_flag='0' then
                        bf_out<=OLm;
                        high_byte_flag<='1';     --we know weve sent the high byte
                else
                        bf_out<=OLl;
                        high_byte_flag<='0';
                        done<='1';              --transfer is finished
                end if;
         else
                        done<='0';              --reset transfer flag

         end if;

        end if;


if i use "bf_in" for writing, and "bf_out" for reading (as per your code (note: i have also named the output of my bidirectional databus buffer as "bf_out" in that module)
then,
can i connect "bf_in" to my bidirectional databus buffer(bf_out)by using the code shown below..
for write operations alone.
module Internal_bus(bf_out,ctr0_select,ctr0_RW,bf_in);
input [7:0]bf_out; //Bidirectional buffer output here declared as input
input ctr0_select,ctr0_RW;
output [7:0]bf_in;//lead to counter data input
assign bf_in[7:0] = (ctr0_select == 1'b1 && ctr0_RW == 1'b1)?(bf_out[7:0]:8'bXXXXXXXX);

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