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);
22 signal xerc : xer_common_t := xerc_init;
23 signal xerc_updated : xer_common_t;
25 cr_create_0: process(all)
26 variable hi, lo : integer := 0;
27 variable cr_tmp : std_ulogic_vector(31 downto 0) := (others => '0');
32 if w_in.write_cr_mask(i) = '1' then
35 cr_tmp(hi downto lo) := w_in.write_cr_data(hi downto lo);
39 crs_updated <= cr_tmp;
41 if w_in.write_xerc_enable = '1' then
42 xerc_updated <= w_in.write_xerc_data;
50 cr_write_0: process(clk)
52 if rising_edge(clk) then
53 if w_in.write_cr_enable = '1' then
54 report "Writing " & to_hstring(w_in.write_cr_data) & " to CR mask " & to_hstring(w_in.write_cr_mask);
57 if w_in.write_xerc_enable = '1' then
58 report "Writing XERC";
65 cr_read_0: process(all)
67 -- just return the entire CR to make mfcrf easier for now
68 if d_in.read = '1' then
69 report "Reading CR " & to_hstring(crs_updated);
71 d_out.read_cr_data <= crs_updated;
72 d_out.read_xerc_data <= xerc_updated;
74 end architecture behaviour;