Skip to content

Commit

Permalink
ADD: move to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
T-K-233 committed Dec 27, 2024
1 parent 3b5b700 commit 5edaa85
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
48 changes: 48 additions & 0 deletions src/main/scala/examples/MinimalArty100T.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import chisel3._
import chisel3.util._
import chisel3.experimental.Analog


class MinimalArty100T extends RawModule {
val io = IO(new Arty100TIO())

val clock = Wire(Clock())
val reset = Wire(Bool())

clock := io.CLK100MHZ
reset := ~io.ck_rst


withClockAndReset(clock, reset) {
val counter = RegInit(0.U(32.W))
counter := counter + 1.U

io.led0.r := io.btn(0)
io.led0.g := false.B
io.led0.b := io.sw(0)

io.led1.r := io.btn(1)
io.led1.g := false.B
io.led1.b := io.sw(1)

io.led2.r := io.btn(2)
io.led2.g := false.B
io.led2.b := io.sw(2)

io.led3.r := io.btn(3)
io.led3.g := false.B
io.led3.b := io.sw(3)

io.led := counter(28, 25)

io.jd_0 := false.B
io.jd_3 := false.B

io.uart_rxd_out := io.uart_txd_in

io.eth_ref_clk := clock
io.eth_rstn := false.B
io.eth_tx_en := false.B
io.eth_txd := 0.U
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import chisel3._
import chisel3.util._


class TinyRocketArty100T extends Arty100TShell {
class TinyRocketArty100T extends RawModule {
val io = IO(new Arty100TIO())

val clock = Wire(Clock())
val reset = Wire(Bool())

Expand Down Expand Up @@ -136,7 +138,7 @@ class TinyRocketArty100T extends Arty100TShell {


val gpio_0 = Module(new axi_gpio_0)
gpio_0.io.s_axi <> digital_top.io.axi4_lite_s_axi
gpio_0.io.s_axi <> digital_top.io.periph_axi4_s_axi
gpio_0.io.gpio_io_i := io.btn
io.led := gpio_0.io.gpio_io_o

Expand Down

0 comments on commit 5edaa85

Please sign in to comment.