Commit a322eb54 authored by Kirk Webb's avatar Kirk Webb

Simulated vs. Real config.

parent afbe133d
......@@ -147,6 +147,9 @@ pc = portal.Context()
#
# Profile parameters.
#
pc.defineParameter("REAL", "Use RF hardware?",
Portal.ParameterType.BOOLEAN, True,
longDescription="Check box to use real hardware for RF. Uncheck for simulated operation.")
pc.defineParameter("FIXED_UE", "Bind to a specific UE",
portal.ParameterType.STRING, "", advanced=True,
longDescription="Input the name of a PhantomNet UE node to allocate (e.g., \'ue1\'). Leave blank to let the mapping algorithm choose.")
......@@ -168,7 +171,7 @@ pc.verifyParameters()
#
request = pc.makeRequestRSpec()
# Add a PC to pair with the X3x0 gNB.
# Add gNB PC.
gnb1 = request.RawPC("gnb1")
if params.FIXED_ENB:
gnb1.component_id = params.FIXED_ENB
......@@ -176,19 +179,21 @@ gnb1.hardware_type = GLOBALS.PC_HWTYPE
gnb1.Desire("site-meb", 1.0)
gnb1.disk_image = GLOBALS.OAI_NR_IMG
connectOAI_DS(gnb1)
gnb1_usrp_if = gnb1.addInterface( "usrp_if" )
gnb1_usrp_if.addAddress( rspec.IPv4Address( "192.168.30.1", "255.255.255.0" ) )
# Add X300 eNB device.
usrp_gnb = request.RawPC( "gnb-lnk")
usrp_gnb.hardware_type = GLOBALS.SDR_HWTYPE
usrp_gnb.setUseTypeDefaultImage()
if params.REAL:
# Add USRP link for PC node and set address.
gnb1_usrp_if = gnb1.addInterface( "usrp_if" )
gnb1_usrp_if.addAddress( rspec.IPv4Address( "192.168.30.1", "255.255.255.0" ) )
# Add X300 eNB device.
usrp_gnb = request.RawPC( "gnb-lnk")
usrp_gnb.hardware_type = GLOBALS.SDR_HWTYPE
usrp_gnb.setUseTypeDefaultImage()
# Link between gNB X3x0 and PC host
enblnk = request.Link( "gNB-link", members = [gnb1_usrp_if, usrp_gnb] )
enblnk.bandwidth = GLOBALS.TENGIG
# Link between gNB X3x0 and PC host
enblnk = request.Link( "gNB-link", members = [gnb1_usrp_if, usrp_gnb] )
enblnk.bandwidth = GLOBALS.TENGIG
# Add a PC to pair with the X3x0 NR-UE.
# Add NR-UE PC.
rue1 = request.RawPC("rue1")
if params.FIXED_ENB:
rue1.component_id = params.FIXED_ENB
......@@ -196,21 +201,25 @@ rue1.hardware_type = GLOBALS.PC_HWTYPE
rue1.Desire("site-meb", 1.0)
rue1.disk_image = GLOBALS.OAI_NR_IMG
connectOAI_DS(rue1)
rue1_usrp_if = rue1.addInterface( "usrp_if" )
rue1_usrp_if.addAddress( rspec.IPv4Address( "192.168.30.1", "255.255.255.0" ) )
# Add X300 NR-UE device.
usrp_ue = request.RawPC( "usrp-ue" )
usrp_ue.hardware_type = GLOBALS.SDR_HWTYPE
usrp_ue.setUseTypeDefaultImage()
# Create UE SDR -> PC link
uelnk = request.Link( "ue-lnk", members = [rue1_usrp_if, usrp_ue] )
uelnk.bandwidth = GLOBALS.TENGIG
# Create NR-UE to gNB PC Ethernet link for performing simulated runs
ethlnk = request.Link( "ue-gnb", members = [gnb1, rue1] )
ethlnk.bandwidth = GLOBALS.TENGIG
if params.REAL:
# Add USRP link for PC node and set address.
rue1_usrp_if = rue1.addInterface( "usrp_if" )
rue1_usrp_if.addAddress( rspec.IPv4Address( "192.168.30.1", "255.255.255.0" ) )
# Add X300 NR-UE device.
usrp_ue = request.RawPC( "usrp-ue" )
usrp_ue.hardware_type = GLOBALS.SDR_HWTYPE
usrp_ue.setUseTypeDefaultImage()
# Create UE SDR -> PC link
uelnk = request.Link( "ue-lnk", members = [rue1_usrp_if, usrp_ue] )
uelnk.bandwidth = GLOBALS.TENGIG
if not params.REAL:
# Create NR-UE to gNB PC Ethernet link for performing simulated runs
ethlnk = request.Link( "ue-gnb", members = [gnb1, rue1] )
ethlnk.bandwidth = GLOBALS.TENGIG
#
# Print and go!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment