-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
326 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
-- Copyright (C) 2017 Intel Corporation. All rights reserved. | ||
-- Your use of Intel Corporation's design tools, logic functions | ||
-- and other software and tools, and its AMPP partner logic | ||
-- functions, and any output files from any of the foregoing | ||
-- (including device programming or simulation files), and any | ||
-- associated documentation or information are expressly subject | ||
-- to the terms and conditions of the Intel Program License | ||
-- Subscription Agreement, the Intel Quartus Prime License Agreement, | ||
-- the Intel FPGA IP License Agreement, or other applicable license | ||
-- agreement, including, without limitation, that your use is for | ||
-- the sole purpose of programming logic devices manufactured by | ||
-- Intel and sold by Intel or its authorized distributors. Please | ||
-- refer to the applicable agreement for further details. | ||
|
||
-- Quartus Prime generated Memory Initialization File (.mif) | ||
|
||
WIDTH=27; | ||
DEPTH=512; | ||
|
||
ADDRESS_RADIX=UNS; | ||
DATA_RADIX=UNS; | ||
|
||
CONTENT BEGIN | ||
[0..511] : 0; | ||
END; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
library IEEE; | ||
use IEEE.std_logic_1164.all; | ||
use IEEE.std_logic_unsigned.all; | ||
use IEEE.std_logic_arith.all; | ||
use work.types.all; | ||
|
||
entity ram is | ||
port ( | ||
clk : in std_logic := '0'; | ||
write_enable : in std_logic := '0'; | ||
addr : in std_logic_vector(8 downto 0) := (others => '0'); | ||
data_in : in data_t := ((others => '0'), (others => '0')); | ||
hit : out std_logic := '0'; | ||
data_out : out data_t := ((others => '0'), (others => '0')) | ||
); | ||
end ram; | ||
|
||
architecture RTL of ram is | ||
|
||
component ram_ip | ||
port ( | ||
address : in std_logic_vector(8 downto 0); | ||
clock : in std_logic; | ||
data : in std_logic_vector(26 downto 0); | ||
wren : in std_logic; | ||
q : out std_logic_vector(26 downto 0) | ||
); | ||
end component; | ||
|
||
signal data : std_logic_vector(26 downto 0) := (others => '0'); | ||
signal q : std_logic_vector(26 downto 0) := (others => '0'); | ||
|
||
begin | ||
|
||
ram_ip_p : ram_ip port map ( | ||
address => addr, | ||
clock => clk, | ||
data => data, | ||
wren => write_enable, | ||
q => q | ||
); | ||
|
||
data <= write_enable & data_in.peak & data_in.len; | ||
|
||
hit <= q(26); | ||
data_out.peak <= q(25 downto 8); | ||
data_out.len <= q(7 downto 0); | ||
|
||
end RTL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
set_global_assignment -name IP_TOOL_NAME "RAM: 1-PORT" | ||
set_global_assignment -name IP_TOOL_VERSION "17.1" | ||
set_global_assignment -name IP_GENERATED_DEVICE_FAMILY "{Cyclone V}" | ||
set_global_assignment -name VHDL_FILE [file join $::quartus(qip_path) "ram_ip.vhd"] |
Oops, something went wrong.