Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
MatheusBurda
arq-comp-microprocessor
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
arq-comp-microprocessor
/
program.asm
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
38 lines (33 loc) · 1.33 KB
master
Breadcrumbs
arq-comp-microprocessor
/
program.asm
Copy path
Top
File metadata and controls
Code
Blame
38 lines (33 loc) · 1.33 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Na versão final entregue, os pinos visíveis no top level, visualizados no gtkwave, devem ser:
• reset;
• clock;
• estado;
• PC;
• instrução (saída do Registrador de Instrução);
• saídas do banco de registradores (valores de Reg1 e Reg2);
• saída da ULA.
Pode usar outros pinos durante a implementação e a fase de debug, mas retire-os para a
entrega.
Também espero que você teste vários programas durante o desenvolvimento mas, para a
entrega, o testbench e a ROM devem estar configurados para executar um programa que faz o
seguinte:
1. Carrega R3 (o registrador 3) com o valor 5
2. Carrega R4 com 8
3. Soma R3 com R4 e guarda em R5
4. Subtrai 1 de R5
5. Salta para o endereço 20
6. No endereço 20, copia R5 para R3
7. Salta para a terceira instrução desta lista (R5 <= R3+R4)
0 ldi r3, 5 0001 011 0000101
1 ldi r4, 8 0001 100 0001000
label: 2 ldi r5, 0 0001 101 0000000
3 add r5, r3 0011 101 011 0000
4 add r5, r4 0011 101 100 0000
5 ldi r1, 1 0001 001 0000001
6 sub r5, r1 0100 101 001 0000
7 jmp 20 ; 0x14 1111 0000010100
8 cp r4,r3 0101 100 011 0000
9 breq label 0111 1111111001
(...)
20 mov r3, r5 0010 011 101 0000
21 jmp 2 1111 0000000010
You can’t perform that action at this time.