2 use ieee.std_logic_1164.all;
3 use ieee.numeric_std.all;
12 d_in : in Decode2ToCrFileType;
13 d_out : out CrFileToDecode2Type;
15 w_in : in WritebackToCrFileType
19 architecture behaviour of cr_file is
20 signal crs : std_ulogic_vector(31 downto 0) := (others => '0');
21 signal crs_updated : std_ulogic_vector(31 downto 0) := (others => '0');
23 cr_create_0: process(all)
24 variable hi, lo : integer := 0;
25 variable cr_tmp : std_ulogic_vector(31 downto 0) := (others => '0');
30 if w_in.write_cr_mask(i) = '1' then
33 cr_tmp(hi downto lo) := w_in.write_cr_data(hi downto lo);
37 crs_updated <= cr_tmp;
41 cr_write_0: process(clk)
43 if rising_edge(clk) then
44 if w_in.write_cr_enable = '1' then
45 report "Writing " & to_hstring(w_in.write_cr_data) & " to CR mask " & to_hstring(w_in.write_cr_mask);
52 cr_read_0: process(all)
54 -- just return the entire CR to make mfcrf easier for now
55 if d_in.read = '1' then
56 report "Reading CR " & to_hstring(crs_updated);
58 d_out.read_cr_data <= crs_updated;
60 end architecture behaviour;