use work.common_pkg.all;
use work.alu_pkg.all;
-entity gpm is
-
- generic (
- -- active reset value
- RESET_VALUE : std_logic;
- -- active logic value
- --LOGIC_ACT : std_logic
-
- );
- port(
- --System inputs
- clk : in std_logic;
- reset : in std_logic;
-
- --exti : in extmod_rec;
- --alu outpus
- alu_nxt : in alu_result_rec;
- --input
-
- --output
- psw : out status_rec;
- --to memcnt
- --addr : out gp_register_t;
- --mem_en : out std_logic;
- --ldst : out std_logic;
- --, hw,byte: std_logic;
- --to output bus
- --exto : out data_ram_word_t
-
- );
-
-end gpm;
-
architecture behaviour of gpm is
type gpm_internal is record
status : status_rec;
end record gpm_internal;
-reg, reg_nxt : gpm_internal;
+signal reg, reg_nxt : gpm_internal;
begin
syn : process (clk, reset)
- if reset = RESET_VALUE then
- reg <= (('0','0','0','0'));
+begin
+ if (reset = RESET_VALUE) then
+ reg.status <= ('0','0','0','0');
elsif rising_edge(clk) then
reg <= reg_nxt;
end if;
end process syn;
-asyn : process (clk, reset)
- reg_nxt <= alu_nxt.status;
+asyn : process (clk, reset, alu_nxt)
+begin
+ reg_nxt.status <= alu_nxt.status;
end process asyn;
-psw <= reg;
+psw <= reg.status;
end architecture behaviour;