VHDL templates? 
Author Message
 VHDL templates?

I want to build something like a register file that passes named data in and out through
signals of a record type (see the VHDL outline below).  How do I make multiple instances
of this register file in a single design where each instance has a different set of

Paul Butler

National Instruments
Austin, TX


package mytypes is

type data_t is
    data2 : std_logic_vector(7 downto 0);
    data3 : std_logic_vector(3 downto 0);
  end record;

subtype add_t is std_logic_vector(1 downto 0);

end mytypes;

use work.mytypes.all;

entity reg_file is
      constant depth : in integer := 4;
     clk : in std_logic;
     add : in add_t;
     rd, wt : in std_logic;
     data_in : in data_t;
     data_out : out data_t
end reg_file;

architecture rtl of reg_file is

  type data_array_t is array(depth-1 downto 0) of data_t;

  signal data_array : data_array_t;


  -- decode the address and rd and wt signals to load
  -- or recall data in the array.

end rtl;

Sat, 26 Jan 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. vhdl templates for emacs

2. VHDL templates.


4. Xemacs VHDL mode (vhdl.zip file, 83 Kbytes) - vhdl.zip (1/1)

5. Internet application template vs. Web application template

6. New templates added to Solace Software Free template set

7. New Templates: the Internet Framework Templates - HTTP Server Edition Version 1.5

8. ABC templates... can i change an applications templates

9. A Template to Write Templates?

10. ANN: New release of S.C.A. Micro Templates (Browse Header Sort and Reverse Sort Template)

11. Clarion templates to ABC templates

12. Kit Template Nova Vida (Template para Backup ON-Line) somente para Brazileiros e Portugueses por enquanto


Powered by phpBB® Forum Software