Skip to content

Commit 02838f5

Browse files
committed
rom_example
1 parent a35cbf0 commit 02838f5

File tree

3 files changed

+122
-0
lines changed

3 files changed

+122
-0
lines changed

lab_04/rom/rom_example.bsf

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/*
2+
WARNING: Do NOT edit the input and output ports in this file in a text
3+
editor if you plan to continue editing the block that represents it in
4+
the Block Editor! File corruption is VERY likely to occur.
5+
*/
6+
/*
7+
Copyright (C) 1991-2013 Altera Corporation
8+
Your use of Altera Corporation's design tools, logic functions
9+
and other software and tools, and its AMPP partner logic
10+
functions, and any output files from any of the foregoing
11+
(including device programming or simulation files), and any
12+
associated documentation or information are expressly subject
13+
to the terms and conditions of the Altera Program License
14+
Subscription Agreement, Altera MegaCore Function License
15+
Agreement, or other applicable license agreement, including,
16+
without limitation, that your use is for the sole purpose of
17+
programming logic devices manufactured by Altera and sold by
18+
Altera or its authorized distributors. Please refer to the
19+
applicable agreement for further details.
20+
*/
21+
(header "symbol" (version "1.2"))
22+
(symbol
23+
(rect 0 0 216 128)
24+
(text "rom_example" (rect 60 0 152 16)(font "Arial" (font_size 10)))
25+
(text "inst" (rect 8 112 25 124)(font "Arial" ))
26+
(port
27+
(pt 0 32)
28+
(input)
29+
(text "address[2..0]" (rect 0 0 75 14)(font "Arial" (font_size 8)))
30+
(text "address[2..0]" (rect 4 16 78 31)(font "Arial" (font_size 8)))
31+
(line (pt 0 32)(pt 88 32)(line_width 3))
32+
)
33+
(port
34+
(pt 0 112)
35+
(input)
36+
(text "clock" (rect 0 0 29 14)(font "Arial" (font_size 8)))
37+
(text "clock" (rect 4 96 33 111)(font "Arial" (font_size 8)))
38+
(line (pt 0 112)(pt 80 112))
39+
)
40+
(port
41+
(pt 216 32)
42+
(output)
43+
(text "q[2..0]" (rect 0 0 35 14)(font "Arial" (font_size 8)))
44+
(text "q[2..0]" (rect 176 16 211 31)(font "Arial" (font_size 8)))
45+
(line (pt 216 32)(pt 136 32)(line_width 3))
46+
)
47+
(drawing
48+
(text "3 bits" (rect 106 30 195 164)(font "Arial" )(vertical))
49+
(text "8 words" (rect 120 16 216 178)(font "Arial" )(vertical))
50+
(text "Block type: AUTO" (rect 48 111 186 236)(font "Arial" ))
51+
(line (pt 104 24)(pt 136 24))
52+
(line (pt 136 24)(pt 136 96))
53+
(line (pt 136 96)(pt 104 96))
54+
(line (pt 104 96)(pt 104 24))
55+
(line (pt 118 58)(pt 123 63))
56+
(line (pt 118 62)(pt 123 57))
57+
(line (pt 88 27)(pt 96 27))
58+
(line (pt 96 27)(pt 96 39))
59+
(line (pt 96 39)(pt 88 39))
60+
(line (pt 88 39)(pt 88 27))
61+
(line (pt 88 34)(pt 90 36))
62+
(line (pt 90 36)(pt 88 38))
63+
(line (pt 80 36)(pt 88 36))
64+
(line (pt 96 32)(pt 104 32)(line_width 3))
65+
(line (pt 80 112)(pt 80 36))
66+
(line (pt 0 0)(pt 217 0))
67+
(line (pt 217 0)(pt 217 130))
68+
(line (pt 0 130)(pt 217 130))
69+
(line (pt 0 0)(pt 0 130))
70+
(line (pt 0 0)(pt 0 0))
71+
(line (pt 0 0)(pt 0 0))
72+
(line (pt 0 0)(pt 0 0))
73+
(line (pt 0 0)(pt 0 0))
74+
)
75+
)

lab_04/rom/rom_example.cmp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--Copyright (C) 1991-2013 Altera Corporation
2+
--Your use of Altera Corporation's design tools, logic functions
3+
--and other software and tools, and its AMPP partner logic
4+
--functions, and any output files from any of the foregoing
5+
--(including device programming or simulation files), and any
6+
--associated documentation or information are expressly subject
7+
--to the terms and conditions of the Altera Program License
8+
--Subscription Agreement, Altera MegaCore Function License
9+
--Agreement, or other applicable license agreement, including,
10+
--without limitation, that your use is for the sole purpose of
11+
--programming logic devices manufactured by Altera and sold by
12+
--Altera or its authorized distributors. Please refer to the
13+
--applicable agreement for further details.
14+
15+
16+
component rom_example
17+
PORT
18+
(
19+
address : IN STD_LOGIC_VECTOR (2 DOWNTO 0);
20+
clock : IN STD_LOGIC := '1';
21+
q : OUT STD_LOGIC_VECTOR (2 DOWNTO 0)
22+
);
23+
end component;

lab_04/rom/rom_example.inc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--Copyright (C) 1991-2013 Altera Corporation
2+
--Your use of Altera Corporation's design tools, logic functions
3+
--and other software and tools, and its AMPP partner logic
4+
--functions, and any output files from any of the foregoing
5+
--(including device programming or simulation files), and any
6+
--associated documentation or information are expressly subject
7+
--to the terms and conditions of the Altera Program License
8+
--Subscription Agreement, Altera MegaCore Function License
9+
--Agreement, or other applicable license agreement, including,
10+
--without limitation, that your use is for the sole purpose of
11+
--programming logic devices manufactured by Altera and sold by
12+
--Altera or its authorized distributors. Please refer to the
13+
--applicable agreement for further details.
14+
15+
16+
FUNCTION rom_example
17+
(
18+
address[2..0],
19+
clock
20+
)
21+
22+
RETURNS (
23+
q[2..0]
24+
);

0 commit comments

Comments
 (0)