Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
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 }}
ErikUmble
BetaB
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
BetaB
/
RegFile.jsim
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
37 lines (28 loc) · 1.13 KB
main
Breadcrumbs
BetaB
/
RegFile.jsim
Copy path
Top
File metadata and controls
Code
Blame
37 lines (28 loc) · 1.13 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
.subckt regfile clk werf ra2sel ra[4:0] rb[4:0] rc[4:0] rc_wb[4:0]
+ wdata[31:0] radata[31:0] rbdata[31:0]
Xtrue_vdd vdd constant1
Xregfile
+ vdd 0 0 ra[4:0] adata[31:0] // A read port
+ vdd 0 0 ra2mux[4:0] bdata[31:0] // B read port
+ 0 clk werf wa[4:0] wdata[31:0] // write port
+ $memory width=32 nlocations=31
Xtrue 1 constant1 //tmp
Xregfile_mux2 b_ra2sel#5 rb[4:0] rc[4:0] ra2mux[4:0] mux2
// determine if a address is 0b11111 for R31
Xreg_nand3_1 ra[4:2] tmp1 nand3
Xreg_nand2_1 ra[1:0] tmp2 nand2
Xreg_nor2_1 tmp1 tmp2 a31sel nor2
// determine if b port address is R31
Xreg_nand3_2 ra2mux[4:2] tmp3 nand3
Xreg_nand2_2 ra2mux[1:0] tmp4 nand2
Xreg_nor2_2 tmp3 tmp4 b31sel nor2
// mux to determine what goes to read ports
Xregfile_mux2_2 b_a31sel#32 adata[31:0] 0#32 radata[31:0] mux2
Xregfile_mux2_3 b_b31sel#32 bdata[31:0] 0#32 rbdata[31:0] mux2
// write to rc
Xrename_wa rc_wb[4:0] wa[4:0] knex
// buffer high load inputs
Xreg_buff_0 a31sel b_a31sel buffer_8
Xreg_buff_1 b31sel b_b31sel buffer_8
Xreg_buff_2 ra2sel b_ra2sel buffer_2
.ends
You can’t perform that action at this time.