3 from litex
.gen
import *
5 from litex
.soc
.interconnect
import wishbone
9 def __init__(self
, platform
, eba_reset
):
10 self
.ibus
= i
= wishbone
.Interface()
11 self
.dbus
= d
= wishbone
.Interface()
12 self
.interrupt
= Signal(32)
18 self
.specials
+= Instance("lm32_cpu",
19 p_eba_reset
=Instance
.PreformattedParam("32'h{:08x}".format(eba_reset
)),
21 i_clk_i
=ClockSignal(),
22 i_rst_i
=ResetSignal(),
24 i_interrupt
=self
.interrupt
,
53 self
.ibus
.adr
.eq(i_adr_o
[2:]),
54 self
.dbus
.adr
.eq(d_adr_o
[2:])
59 os
.path
.abspath(os
.path
.dirname(__file__
)), "verilog")
60 platform
.add_sources(os
.path
.join(vdir
, "submodule", "rtl"),
61 "lm32_cpu.v", "lm32_instruction_unit.v", "lm32_decoder.v",
62 "lm32_load_store_unit.v", "lm32_adder.v", "lm32_addsub.v", "lm32_logic_op.v",
63 "lm32_shifter.v", "lm32_multiplier.v", "lm32_mc_arithmetic.v",
64 "lm32_interrupt.v", "lm32_ram.v", "lm32_dp_ram.v", "lm32_icache.v",
65 "lm32_dcache.v", "lm32_debug.v", "lm32_itlb.v", "lm32_dtlb.v")
66 platform
.add_verilog_include_path(vdir
)