@@ -14,7 +14,7 @@ class GenSoC(Module):
14
14
csr_base = 0xe0000000
15
15
csr_map = {
16
16
"crg" : 0 , # user
17
- "uart" : 1 , # provided
17
+ "uart" : 1 , # provided by default
18
18
"identifier" : 2 , # provided
19
19
"timer0" : 3 , # provided
20
20
"buttons" : 4 , # user
@@ -30,7 +30,7 @@ class GenSoC(Module):
30
30
"papilio_pro" : 0x5050
31
31
})
32
32
33
- def __init__ (self , platform , clk_freq , cpu_reset_address , sram_size , l2_size = 0 ):
33
+ def __init__ (self , platform , clk_freq , cpu_reset_address , sram_size = 4096 , l2_size = 0 , with_uart = True ):
34
34
self .clk_freq = clk_freq
35
35
self .cpu_reset_address = cpu_reset_address
36
36
self .sram_size = sram_size
@@ -54,7 +54,8 @@ def __init__(self, platform, clk_freq, cpu_reset_address, sram_size, l2_size=0):
54
54
self .add_cpu_memory_region ("sram" , 0x10000000 , sram_size )
55
55
56
56
# CSR
57
- self .submodules .uart = uart .UART (platform .request ("serial" ), clk_freq , baud = 115200 )
57
+ if with_uart :
58
+ self .submodules .uart = uart .UART (platform .request ("serial" ), clk_freq , baud = 115200 )
58
59
self .submodules .identifier = identifier .Identifier (self .known_platform_id [platform .name ], int (clk_freq ),
59
60
log2_int (l2_size ) if l2_size else 0 )
60
61
self .submodules .timer0 = timer .Timer ()
@@ -130,8 +131,8 @@ class SDRAMSoC(GenSoC):
130
131
}
131
132
csr_map .update (GenSoC .csr_map )
132
133
133
- def __init__ (self , platform , clk_freq , cpu_reset_address , sram_size , l2_size , with_memtest ):
134
- GenSoC .__init__ (self , platform , clk_freq , cpu_reset_address , sram_size , l2_size )
134
+ def __init__ (self , platform , clk_freq , cpu_reset_address , with_memtest = False , sram_size = 4096 , l2_size = 8192 , with_uart = True ):
135
+ GenSoC .__init__ (self , platform , clk_freq , cpu_reset_address , sram_size , l2_size , with_uart )
135
136
self .with_memtest = with_memtest
136
137
self ._sdram_phy_registered = False
137
138
0 commit comments