File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 77
88class UTMITranslator (Elaboratable ):
99 """ULPI-UTMI translator for LUNA wrapping around ultraembedded's core."""
10- def __init__ (self , ulpi ):
10+ def __init__ (self , ulpi , reset = True ):
1111 self ._ulpi = ulpi
12+ self ._reset = reset
1213 self .utmi = UTMIInterface ()
1314
1415 def elaborate (self , platform ):
@@ -40,12 +41,16 @@ def elaborate(self, platform):
4041 platform .add_file ("ulpi_wrapper.v" , f )
4142
4243 # POR
43- por_cycles = int (60e6 * 2e-6 ) # 2us reset
44- por_cnt = Signal (range (por_cycles ), reset = por_cycles - 1 )
45- with m .If (por_cnt > 0 ):
46- m .d .sync += por_cnt .eq (por_cnt - 1 )
4744 por_active = Signal ()
48- m .d .comb += por_active .eq (por_cnt > 0 )
45+ if self ._reset :
46+ por_cycles = int (60e6 * 2e-6 ) # 2us reset
47+ por_cnt = Signal (range (por_cycles ), reset = por_cycles - 1 )
48+ with m .If (por_cnt > 0 ):
49+ m .d .sync += por_cnt .eq (por_cnt - 1 )
50+
51+ m .d .comb += por_active .eq (por_cnt > 0 )
52+ else :
53+ m .d .comb += por_active .eq (0 )
4954
5055 # UTMI signals not handled by the translator
5156 m .d .comb += [
You can’t perform that action at this time.
0 commit comments