1 |
2 |
armando |
--
|
2 |
|
|
-- Definition of a single port ROM for KCPSM program defined by cfreader.psm
|
3 |
|
|
-- and assmbled using KCPSM assembler.
|
4 |
|
|
--
|
5 |
|
|
-- Standard IEEE libraries
|
6 |
|
|
--
|
7 |
|
|
library IEEE;
|
8 |
|
|
use IEEE.STD_LOGIC_1164.ALL;
|
9 |
|
|
use IEEE.STD_LOGIC_ARITH.ALL;
|
10 |
|
|
use IEEE.STD_LOGIC_UNSIGNED.ALL;
|
11 |
|
|
--
|
12 |
|
|
-- The Unisim Library is used to define Xilinx primitives. It is also used during
|
13 |
|
|
-- simulation. The source can be viewed at %XILINX%\vhdl\src\unisims\unisim_VCOMP.vhd
|
14 |
|
|
--
|
15 |
|
|
library unisim;
|
16 |
|
|
use unisim.vcomponents.all;
|
17 |
|
|
--
|
18 |
|
|
--
|
19 |
|
|
entity cfreader is
|
20 |
|
|
Port ( address : in std_logic_vector(7 downto 0);
|
21 |
|
|
instruction : out std_logic_vector(15 downto 0);
|
22 |
|
|
clk : in std_logic);
|
23 |
|
|
end cfreader;
|
24 |
|
|
--
|
25 |
|
|
architecture low_level_definition of cfreader is
|
26 |
|
|
--
|
27 |
|
|
-- Attributes to define ROM contents during implementation synthesis.
|
28 |
|
|
-- The information is repeated in the generic map for functional simulation
|
29 |
|
|
--
|
30 |
|
|
attribute INIT_00 : string;
|
31 |
|
|
attribute INIT_01 : string;
|
32 |
|
|
attribute INIT_02 : string;
|
33 |
|
|
attribute INIT_03 : string;
|
34 |
|
|
attribute INIT_04 : string;
|
35 |
|
|
attribute INIT_05 : string;
|
36 |
|
|
attribute INIT_06 : string;
|
37 |
|
|
attribute INIT_07 : string;
|
38 |
|
|
attribute INIT_08 : string;
|
39 |
|
|
attribute INIT_09 : string;
|
40 |
|
|
attribute INIT_0A : string;
|
41 |
|
|
attribute INIT_0B : string;
|
42 |
|
|
attribute INIT_0C : string;
|
43 |
|
|
attribute INIT_0D : string;
|
44 |
|
|
attribute INIT_0E : string;
|
45 |
|
|
attribute INIT_0F : string;
|
46 |
|
|
--
|
47 |
|
|
-- Attributes to define ROM contents during implementation synthesis.
|
48 |
|
|
--
|
49 |
|
|
attribute INIT_00 of ram_256_x_16 : label is "0FFF06000500EF020FFFEF030F18EF01EF000F00EF06EF05EF040F00EF070F00";
|
50 |
|
|
attribute INIT_01 of ram_256_x_16 : label is "912A6F05CF30A302CFF1CFF1CFF1CFF183470FFF83470FFF83470FFF83CB8347";
|
51 |
|
|
attribute INIT_02 of ram_256_x_16 : label is "A903813EC5F10F00A804A7038118EF06EF070F0091366F01CF30912F6F15CF30";
|
52 |
|
|
attribute INIT_03 of ram_256_x_16 : label is "EF060F01EF070F02EC05EB0495341F08CF508396050083CB813EC5F10F00AA04";
|
53 |
|
|
attribute INIT_04 of ram_256_x_16 : label is "ED00EF03808095486101954960010003C1F08118EF060F00CFF1CFF1CFF1CFF1";
|
54 |
|
|
attribute INIT_05 of ram_256_x_16 : label is "0F0083470F01EF030F18EF020FFF83470F02EF020FFD83470F01EF070F01EE01";
|
55 |
|
|
attribute INIT_06 of ram_256_x_16 : label is "0FFFAC01AB0083470F02EF020FFEEF070F0083470F01EF03808083470F02EF07";
|
56 |
|
|
attribute INIT_07 of ram_256_x_16 : label is "834E0F14CD80834E0F13CD70834E0F120D01834E0F110D008080EF030F18EF02";
|
57 |
|
|
attribute INIT_08 of ram_256_x_16 : label is "0F0494801F08CF5083B8834E0F170D20834E0F16CDF02FE0CFA0834E0F15CD90";
|
58 |
|
|
attribute INIT_09 of ram_256_x_16 : label is "660191A1C66183A594801F08CF5093ACCF510F01808006FFC5F20F01918BCF51";
|
59 |
|
|
attribute INIT_0A of ram_256_x_16 : label is "95AA1F04CF5083B8660183A58080EF060F0283640F108080C5F10FFE06FF8080";
|
60 |
|
|
attribute INIT_0B of ram_256_x_16 : label is "6F48CFB10FC995C6CFB10F0183640F17817491AC06FF1F02CF5094801F08CF50";
|
61 |
|
|
attribute INIT_0C of ram_256_x_16 : label is "83470FFF834E0F0E0D048080050883CBEF070F04808091DE6F40CFB10FC191DA";
|
62 |
|
|
attribute INIT_0D of ram_256_x_16 : label is "0F0215FB8080C5F20F0415FD8080834E0F0E0D0083470FFF83470FFF83470FFF";
|
63 |
|
|
attribute INIT_0E of ram_256_x_16 : label is "000000000000000000000000000000000000000000000000000000008080C5F2";
|
64 |
|
|
attribute INIT_0F of ram_256_x_16 : label is "80F0000000000000000000000000000000000000000000000000000000000000";
|
65 |
|
|
--
|
66 |
|
|
begin
|
67 |
|
|
--
|
68 |
|
|
--Instantiate the Xilinx primitive for a block RAM
|
69 |
|
|
ram_256_x_16: RAMB4_S16
|
70 |
|
|
--translate_off
|
71 |
|
|
--INIT values repeated to define contents for functional simulation
|
72 |
|
|
generic map (INIT_00 => X"0FFF06000500EF020FFFEF030F18EF01EF000F00EF06EF05EF040F00EF070F00",
|
73 |
|
|
INIT_01 => X"912A6F05CF30A302CFF1CFF1CFF1CFF183470FFF83470FFF83470FFF83CB8347",
|
74 |
|
|
INIT_02 => X"A903813EC5F10F00A804A7038118EF06EF070F0091366F01CF30912F6F15CF30",
|
75 |
|
|
INIT_03 => X"EF060F01EF070F02EC05EB0495341F08CF508396050083CB813EC5F10F00AA04",
|
76 |
|
|
INIT_04 => X"ED00EF03808095486101954960010003C1F08118EF060F00CFF1CFF1CFF1CFF1",
|
77 |
|
|
INIT_05 => X"0F0083470F01EF030F18EF020FFF83470F02EF020FFD83470F01EF070F01EE01",
|
78 |
|
|
INIT_06 => X"0FFFAC01AB0083470F02EF020FFEEF070F0083470F01EF03808083470F02EF07",
|
79 |
|
|
INIT_07 => X"834E0F14CD80834E0F13CD70834E0F120D01834E0F110D008080EF030F18EF02",
|
80 |
|
|
INIT_08 => X"0F0494801F08CF5083B8834E0F170D20834E0F16CDF02FE0CFA0834E0F15CD90",
|
81 |
|
|
INIT_09 => X"660191A1C66183A594801F08CF5093ACCF510F01808006FFC5F20F01918BCF51",
|
82 |
|
|
INIT_0A => X"95AA1F04CF5083B8660183A58080EF060F0283640F108080C5F10FFE06FF8080",
|
83 |
|
|
INIT_0B => X"6F48CFB10FC995C6CFB10F0183640F17817491AC06FF1F02CF5094801F08CF50",
|
84 |
|
|
INIT_0C => X"83470FFF834E0F0E0D048080050883CBEF070F04808091DE6F40CFB10FC191DA",
|
85 |
|
|
INIT_0D => X"0F0215FB8080C5F20F0415FD8080834E0F0E0D0083470FFF83470FFF83470FFF",
|
86 |
|
|
INIT_0E => X"000000000000000000000000000000000000000000000000000000008080C5F2",
|
87 |
|
|
INIT_0F => X"80F0000000000000000000000000000000000000000000000000000000000000",
|
88 |
|
|
--translate_on
|
89 |
|
|
port map( DI => "0000000000000000",
|
90 |
|
|
EN => '1',
|
91 |
|
|
WE => '0',
|
92 |
|
|
RST => '0',
|
93 |
|
|
CLK => clk,
|
94 |
|
|
ADDR => address,
|
95 |
|
|
DO => instruction(15 downto 0));
|
96 |
|
|
--
|
97 |
|
|
end low_level_definition;
|
98 |
|
|
--
|
99 |
|
|
------------------------------------------------------------------------------------
|
100 |
|
|
--
|
101 |
|
|
-- END OF FILE cfreader.vhd
|
102 |
|
|
--
|
103 |
|
|
------------------------------------------------------------------------------------
|