Advertisement
Mikestriken

PC_ALU

Apr 7th, 2023 (edited)
1,863
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.54 KB | None | 0 0
  1. library IEEE;
  2. use IEEE.STD_LOGIC_1164.ALL;
  3. use IEEE.NUMERIC_STD.ALL;
  4.  
  5. entity pc_alu is
  6.     port (
  7.         current_instruction     : in  std_logic_vector(63 downto 0); -- Note: current instruction needs to be divided by 4 technically.
  8.         next_instruction  : out std_logic_vector(63 downto 0)
  9.     );
  10. end entity pc_alu;
  11.  
  12. architecture dataflow of pc_alu is
  13.     constant next_instruction_offset : integer := 4;
  14. begin
  15.     next_instruction <= std_logic_vector(unsigned(current_instruction) + next_instruction_offset);
  16. end architecture dataflow;
Tags: PC_ALU
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement