Adding Memories and I/O
合集下载
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Memory Block Signals
Address – 32 bits
Mem Write – 1 bit
Write Data – 32 bits
Read Data – 32 bits
Mem Read – 1 bit
4
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Using 2 Block RAMs
• Illustration from book • Let’s work it out for Block RAMs • Specs next
5
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Block RAM Specs
Adding Memories and I/O
Anselmo Lastra
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
The MIPS Datapath
2
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Let’s Add Keyboard Register
• Can put it at location 1024 (binary 100 0000 0000)
• Will now want to decode 3 bits
8
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Another Approach
• Let’s see how to add a block of x8 character memory for the VGA
• Need to makeRSITY of NORTH CAROLINA at CHAPEL HILL
Memory Map
• Refers to how physical memory is populated
• In our example, memory from 0 to 511
♦ It’s in two blocks, but that’s invisible to programmer
Expanding Memory Block
• First let’s look in detail at data memory block
• See how to add block memories • Add I/O
3
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
9
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Memory Map
0 01 0000 0000 -256
Instruction and Data Memory
Empty
10 0000 0000 512
Character Memory
10
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
12
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
In Reality
• Isolated from CPU • On standard buses
♦ PCI
• Ours will be simpler
♦ Just memory addresses
13
there
♦ Real computers have flash memory to boot CPU or go to configuration utility
♦ On (very) old computers had to enter boot program on front panel
15
• Try 2 256x16
6
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Adding More Memory
• Illustration from text
• Let’s see how to add 2 more block RAMs to increase mem to 512 words
• What happens if we read location 1025?
14
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
How Does Processor Begin
• One way is to initialize PC to 0 • Make sure to have instructions
Verilog
• Can sketch how to code this in Verilog
11
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Adding I/O
• Look at memory-mapped I/O • Conceptually like this