File tree 1 file changed +2
-16
lines changed
misoclib/tools/litescope/example_designs/targets
1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change 1
1
from migen .bank .description import *
2
+ from migen .genlib .io import CRG
2
3
3
4
from misoclib .soc import SoC
4
5
from misoclib .tools .litescope .common import *
7
8
from misoclib .tools .litescope .frontend .la import LiteScopeLA
8
9
from misoclib .tools .litescope .core .port import LiteScopeTerm
9
10
10
- class _CRG (Module ):
11
- def __init__ (self , clk_in ):
12
- self .clock_domains .cd_sys = ClockDomain ()
13
- self .clock_domains .cd_por = ClockDomain (reset_less = True )
14
-
15
- # Power on Reset (vendor agnostic)
16
- rst_n = Signal ()
17
- self .sync .por += rst_n .eq (1 )
18
- self .comb += [
19
- self .cd_sys .clk .eq (clk_in ),
20
- self .cd_por .clk .eq (clk_in ),
21
- self .cd_sys .rst .eq (~ rst_n )
22
- ]
23
-
24
11
class LiteScopeSoC (SoC , AutoCSR ):
25
12
csr_map = {
26
13
"io" : 16 ,
@@ -37,8 +24,7 @@ def __init__(self, platform):
37
24
with_identifier = True ,
38
25
with_timer = False
39
26
)
40
- clk_in = platform .request (platform .default_clk_name )
41
- self .submodules .crg = _CRG (clk_in if not hasattr (clk_in , "p" ) else clk_in .p )
27
+ self .submodules .crg = CRG (platform .request (platform .default_clk_name ))
42
28
43
29
self .submodules .io = LiteScopeIO (8 )
44
30
for i in range (8 ):
You can’t perform that action at this time.
0 commit comments