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

Subversion Repositories soc_maker

[/] [soc_maker/] [trunk/] [spec/] [soc_def_spec.rb] - Diff between revs 7 and 8

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 7 Rev 8
Line 233... Line 233...
      end
      end
 
 
 
 
      it "should raise an ProcessingError if the ifc.-version is wrong" do
      it "should raise an ProcessingError if the ifc.-version is wrong" do
 
 
        ifc_spc1 = SOCMaker::IfcSpc.new( "myifc", "v1", 'ports' => { port_a: 1, port_b: 0 } )
        ifc_spc1 = SOCMaker::IfcSpc.new( "myifc", "v1", 'ports' => { port_a: {dir:1}, port_b: {dir:0} } )
        ifc_spc2 = SOCMaker::IfcSpc.new( "myifc", "v2", 'ports' => { port_a: 1, port_b: 0 } )
        ifc_spc2 = SOCMaker::IfcSpc.new( "myifc", "v2", 'ports' => { port_a: {dir:1}, port_b: {dir:0} } )
        ifc_def_1 = SOCMaker::IfcDef.new( "myifc", "v1", 0, { a: SOCMaker::IfcPort.new( "port_a", 1 ) } )
        ifc_def_1 = SOCMaker::IfcDef.new( "myifc", "v1", 0, { a: SOCMaker::IfcPort.new( "port_a", 1 ) } )
        ifc_def_0 = SOCMaker::IfcDef.new( "myifc", "v2", 1, { b: SOCMaker::IfcPort.new( "port_b", 1 ) } )
        ifc_def_0 = SOCMaker::IfcDef.new( "myifc", "v2", 1, { b: SOCMaker::IfcPort.new( "port_b", 1 ) } )
        file = { "file.vhd".to_sym => SOCMaker::HDLFile.new( "./file.vhd" ) }
        file = { "file.vhd".to_sym => SOCMaker::HDLFile.new( "./file.vhd" ) }
        core_a = SOCMaker::CoreDef.new( "core_a", "v1", file, "top" )
        core_a = SOCMaker::CoreDef.new( "core_a", "v1", file, "top" )
        core_b = SOCMaker::CoreDef.new( "core_b", "v1", file, "top" )
        core_b = SOCMaker::CoreDef.new( "core_b", "v1", file, "top" )
Line 260... Line 260...
 
 
 
 
 
 
      it "should add a connection entry" do
      it "should add a connection entry" do
 
 
        ifc_spc = SOCMaker::IfcSpc.new( "myifc", "v1", 'ports' => { port_a: 1, port_b: 0 } )
        ifc_spc = SOCMaker::IfcSpc.new( "myifc", "v1", 'ports' => { port_a: {dir:1}, port_b: {dir:0} } )
        ifc_def_1 = SOCMaker::IfcDef.new( "myifc", "v1", 0, { a: SOCMaker::IfcPort.new( "port_a", 1 ) } )
 
        ifc_def_0 = SOCMaker::IfcDef.new( "myifc", "v1", 1, { b: SOCMaker::IfcPort.new( "port_b", 1 ) } )
        ifc_def_1 = SOCMaker::IfcDef.new( "myifc", "v1", 0, { a: SOCMaker::IfcPort.new( "port_a", 1 ),
 
                                                              b: SOCMaker::IfcPort.new( "port_b", 1 ) } )
 
 
 
        ifc_def_0 = SOCMaker::IfcDef.new( "myifc", "v1", 1, { a: SOCMaker::IfcPort.new( "port_a", 1 ),
 
                                                              b: SOCMaker::IfcPort.new( "port_b", 1 ) } )
 
 
 
 
        file = { "file.vhd".to_sym => SOCMaker::HDLFile.new( "./file.vhd" ) }
        file = { "file.vhd".to_sym => SOCMaker::HDLFile.new( "./file.vhd" ) }
        core_a = SOCMaker::CoreDef.new( "core_a", "v1", file, "top" )
        core_a = SOCMaker::CoreDef.new( "core_a", "v1", file, "top" )
        core_b = SOCMaker::CoreDef.new( "core_b", "v1", file, "top" )
        core_b = SOCMaker::CoreDef.new( "core_b", "v1", file, "top" )
        core_a.interfaces[ :ifc_a ] = ifc_def_0
        core_a.interfaces[ :ifc_a ] = ifc_def_0
        core_a.interfaces[ :ifc_b ] = ifc_def_1
        core_a.interfaces[ :ifc_b ] = ifc_def_1
Line 289... Line 295...
 
 
 
 
 
 
      it "should add a connection entry, which connects the toplevel's port" do
      it "should add a connection entry, which connects the toplevel's port" do
 
 
        ifc_spc = SOCMaker::IfcSpc.new( "myifc", "v1", 'ports' => { port_a: 1, port_b: 0 } )
        ifc_spc = SOCMaker::IfcSpc.new( "myifc", "v1", 'ports' => { port_a: {dir:1}, port_b: {dir:0} } )
        ifc_def_1 = SOCMaker::IfcDef.new( "myifc", "v1", 0, { a: SOCMaker::IfcPort.new( "port_a", 1 ) } )
 
        ifc_def_0 = SOCMaker::IfcDef.new( "myifc", "v1", 1, { b: SOCMaker::IfcPort.new( "port_b", 1 ) } )
        ifc_def_1 = SOCMaker::IfcDef.new( "myifc", "v1", 0, { a: SOCMaker::IfcPort.new( "port_a", 1 ),
 
                                                              b: SOCMaker::IfcPort.new( "port_b", 1 ) } )
 
 
 
        ifc_def_0 = SOCMaker::IfcDef.new( "myifc", "v1", 1, { a: SOCMaker::IfcPort.new( "port_a", 1 ),
 
                                                              b: SOCMaker::IfcPort.new( "port_b", 1 ) } )
 
 
        file = { "file.vhd".to_sym => SOCMaker::HDLFile.new( "./file.vhd" ) }
        file = { "file.vhd".to_sym => SOCMaker::HDLFile.new( "./file.vhd" ) }
        core_a = SOCMaker::CoreDef.new( "core_a", "v1", file, "top" )
        core_a = SOCMaker::CoreDef.new( "core_a", "v1", file, "top" )
        core_a.interfaces[ :ifc_a ] = ifc_def_0
        core_a.interfaces[ :ifc_a ] = ifc_def_0
        core_a.interfaces[ :ifc_b ] = ifc_def_1
        core_a.interfaces[ :ifc_b ] = ifc_def_1
 
 

powered by: WebSVN 2.1.0

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