commit | ea831d66a3ac27e5571f093c8310d10ea2f7a249 | [log] [tgz] |
---|---|---|
author | root <hi@anth.dev> | Sat Dec 19 08:05:40 2020 -0500 |
committer | root <hi@anth.dev> | Sat Dec 19 08:05:40 2020 -0500 |
tree | 4a7f55b80f8b5932ba7c5f449ab86cacd82fb55f | |
parent | 0b0c93d3d78eb63d363b4ec11b39e40198f1ebfd [diff] | |
parent | ddd1e6fca0f0920b10e2d5c9a8c1207ab318ae61 [diff] |
Merge branch 'master' of https://github.com/hsc-latte/caravel-hs32core
The HSC Latte HS32 Core is a 32-bits RISC CPU. The HS32 Core has 32-bits instructions and 16 32-bits registers.
Below is a list of HS32 Core Project Directories:
Repository | Description | License | Issues | Stars | Contributors |
---|---|---|---|---|---|
caravel-hs32core | Core Harness | ||||
hs32core-rtl | RTL Circuit Design | ||||
hs32core | Main Project Repository |
These are the different encodings that instructions come in. All instructions are 32 bit. The first 8 bits is opcode. Rd, Rm, Rn are always in the same position in the instruciton if present indicates unused spacer value of X bits
There are 16 (r0-r15) general-purpose registers plus 4 privileged registers. In supervisor mode, r12-15 is separate from user-mode r12-15. In all modes, r14 and r15 will be used as the link register and stack pointer respectively.
Legend:
During a mode switch, the return address will be stored in the appropriate LR and the return stack pointer will be stored in the appropriate SP.
For instance, an interrupt call from User mode will prompt a switch to IRQ mode. The return address and stack pointer of the caller will be stored in IRQ LR (r14) and IRQ SP (r15) respectively.
Pin # | Name | Description |
---|---|---|
0-15 | IO0-15 | Address/Data Parallel Bus: These lines contain the time-multiplexed address (T1, T2) and data (TW, T4) buses. During the T1 cycle, bits A0-A7 of the address bus is outputted. Bit A0 is the BLE# signal. It is LOW during T1 if only the low 8-bits is to be transferred during memory or I/O operations. |
16 | ALE0 | Address Latch Enable (LOW): HIGH during T1 to signal for the latching of the low 8-bits of the address signal. It is LOW otherwise. |
17 | ALE1 | Address Latch Enable (HIGH): HIGH during T2 to signal for the latching of the high 8-bits of the address signal. It is LOW otherwise. |
18 | WE# | Write Enable: Write strobe is LOW during TW to indicate that the processor is performing an I/O or memory write operation. |
19 | OE# | Output Enable: When LOW, indicates that the processor IO lines are ready to accept/output data. It is held HIGH during T1 and T2. |
20 | BHE# | Bus High Enable: When LOW, signals for the high 8-bits to be transferred during memory or I/O operations. |
22 | PIO | IO Mode: When HIGH, indicates that the current operation is an I/O, not memory, operation. This results in the omittance of cycle T2. |
23, 24 | RX, TX | 9600 Baud UART Interface |
25-... | GPIO0-... | General Purpose Input/Output |
Various timing diagrams of the address and data buses
Clock Cycles: 4 minimum
Timing Requirements:
tpd
of whichever memory chip used.In the implementation, OE# is the AND of 2 signals, one leading edge and one falling edge-driven signals.
Clock Cycles: 4 minimum
Timing Requirements:
HS32 RTL -- verilog/rtl/hs32cpu
Documentation -- verilog/rtl/hs32cpu/docs
Testbenches -- verilog/rtl/hs32cpu/bench
CPU Modules -- verilog/rtl/hs32cpu/cpu
Frontend Modules -- verilog/rtl/hs32cpu/frontend
SOC Modules -- verilog/rtl/hs32cpu/soc
Third Party Modules -- verilog/rtl/hs32cpu/third_party
Programmer -- verilog/rtl/hs32cpu/programmer
Openlane -- verilog/rtl/hs32cpu/openlane
Skywater -- verilog/rtl/hs32cpu/skywater
HS32 ISA -- verilog/rtl/hs32cpu/docs/isa_formal.txt
Top Level Module -- verilog/rtl/hs32cpu/top.v
HS32 Interrupts -- verilog/rtl/hs32cpu/docs/interrupts.md
HS32 MMIO -- verilog/rtl/hs32cpu/docs/mmio.md
Issues and pull requests are welcome! Please make sure to create them at the right repository :D
We take any security risks seriously, if you have found or suspected a vulnerability or anything that might compromise our security, we would very much appreciate it if you can report it to us.
Apache 2.0 LICENSE
HS32 Core - A 32-bits RISC Processor
Copyright (c) 2020 The HSC Core Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.