OpenCores
URL https://opencores.org/ocsvn/tinycpu/tinycpu/trunk

Subversion Repositories tinycpu

[/] [tinycpu/] [trunk/] [src/] [registerfile.vhd] - Diff between revs 12 and 19

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 12 Rev 19
Line 17... Line 17...
                DataOut: out regdatatype
                DataOut: out regdatatype
  );
  );
end registerfile;
end registerfile;
 
 
architecture Behavioral of registerfile is
architecture Behavioral of registerfile is
 
 
  type registerstype is array(0 to 15) of std_logic_vector(7 downto 0);
  type registerstype is array(0 to 15) of std_logic_vector(7 downto 0);
  signal registers: registerstype;
  signal registers: registerstype;
  --attribute ram_style : string;
  --attribute ram_style : string;
  --attribute ram_style of registers: signal is "distributed";
  --attribute ram_style of registers: signal is "distributed";
begin
begin
  regs:
  regs: for I in 0 to 15 generate
  for I in 0 to 15 generate
 
    process(WriteEnable(I), DataIn(I), Clock)
    process(WriteEnable(I), DataIn(I), Clock)
         begin
         begin
                                if rising_edge(Clock) then
                                if rising_edge(Clock) then
                if(WriteEnable(I) = '1') then
                if(WriteEnable(I) = '1') then
                  registers(I) <= DataIn(I);
                  registers(I) <= DataIn(I);

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.