OpenCores
URL https://opencores.org/ocsvn/soc_maker/soc_maker/trunk

Subversion Repositories soc_maker

[/] [soc_maker/] [trunk/] [examples/] [or1200_test/] [or1200_test.rb] - Blame information for rev 7

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 7 feddischso
require_relative '../lib/soc_maker'
2
 
3
options = {}
4
options[ :libpath     ] = "./core_lib/"
5
##
6
# initialize SOCMaker core
7
#   this sets up logging and parses all yaml files
8
#   found in the configure path (see also soc_maker_conf.rb)
9
SOCMaker::load( options )
10
 
11
 
12
puts "Library Content:"
13
 
14
 
15
puts SOCMaker::lib
16
 
17
 
18
SOCMaker::lib.cores do |name_version, core|
19
#   core.get_files
20
end
21
 
22
soc = SOCMaker::SOCDef.new( 'or1200_test', 'v1', 'or1200_test' )
23
SOCMaker::lib.add_core( soc )
24
soc_inst = SOCMaker::CoreInst.new( 'or1200_testv1' )
25
#soc_inst.name = "soc_inst"
26
 
27
 
28
port = SOCMaker::IfcPort.new( 'clk', 1 )
29
ifc  = SOCMaker::IfcDef.new( 'clk', '1', 1, { 'clk_i' => port} )
30
soc.interfaces[ 'clk_ifc'.to_sym ] = ifc
31
 
32
port = SOCMaker::IfcPort.new( 'rst', 1 )
33
ifc  = SOCMaker::IfcDef.new( 'rst', '1', 1, { 'rst_i' => port} )
34
soc.interfaces[ 'rst_ifc'.to_sym ] = ifc
35
 
36
soc.interfaces[ 'jtag_ifc'.to_sym ] = SOCMaker::IfcDef.new( 'jtag_tap', '1', 1, {
37
   'tck_i'           => SOCMaker::IfcPort.new( 'tck', 1 ),
38
   'tdi_i'           => SOCMaker::IfcPort.new( 'tdi', 1 ),
39
   'tdo_o'           => SOCMaker::IfcPort.new( 'tdo' ,1 ),
40
   'debug_rst_i'       => SOCMaker::IfcPort.new( 'rst', 1 ),
41
   'shift_dr_i'      => SOCMaker::IfcPort.new( 'shift', 1 ),
42
   'pause_dr_i'      => SOCMaker::IfcPort.new( 'pause', 1 ),
43
   'update_dr_i'     => SOCMaker::IfcPort.new( 'update', 1 ),
44
   'capture_dr_i'    => SOCMaker::IfcPort.new( 'capture', 1 ),
45
   'debug_select_i'  => SOCMaker::IfcPort.new( 'select', 1 ) } )
46
 
47
 
48
 
49
soc.add_core( 'or1200',          'rel2',  'cpu'    )
50
soc.add_core( 'wb_connect',      '1',     'wb_bus' )
51
soc.add_core( 'adv_debug_sys',   'ads_3', 'dbg' )
52
soc.add_core( 'ram_wb',          'b3',    'ram' )
53
soc.consistency_check
54
 
55
 
56
soc.add_connection( 'or1200_test', 'clk_ifc', 'cpu', 'clk',  'con_main_clk'      )
57
soc.add_connection( 'or1200_test', 'rst_ifc', 'cpu', 'rst',  'con_main_rst'      )
58
soc.add_connection( 'or1200_test', 'clk_ifc', 'wb_bus', 'clk',  'con_main_clk'   )
59
soc.add_connection( 'or1200_test', 'rst_ifc', 'wb_bus', 'rst',  'con_main_rst'   )
60
 
61
soc.add_connection( 'wb_bus', 'i0', 'cpu', 'wb_instruction',   'con_instruction' )
62
soc.add_connection( 'wb_bus', 'i1', 'cpu', 'wb_data',          'con_data'        )
63
soc.add_connection( 'wb_bus', 'i2', 'dbg', 'wb_ifc',           'con_wb_debug'    )
64
soc.add_connection( 'wb_bus', 't1', 'ram', 'wb_ifc',           'con_ram'         )
65
 
66
soc.add_connection( 'dbg',         'cpu0_dbg',  'cpu', 'ext_debug',           'con_debug'       )
67
 
68
soc.add_connection( 'or1200_test', 'clk_ifc',   'dbg',        'cpu0_dbg_clk',   'con_main_clk'     )
69
soc.add_connection( 'or1200_test', 'jtag_ifc',  'dbg',        'jtag',           'con_jtag'         )
70
 
71
soc_inst.consistency_check
72
soc_inst.gen_toplevel
73
 
74
soc.copy_files
75
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.