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

Subversion Repositories soc_maker

[/] [soc_maker/] [trunk/] [lib/] [soc_maker/] [cli.rb] - Diff between revs 5 and 6

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

Rev 5 Rev 6
Line 104... Line 104...
  def do_new( args )
  def do_new( args )
    if args.size != 3
    if args.size != 3
      puts "three arguments are required:\nusage:\n#{NEW_USAGE}"
      puts "three arguments are required:\nusage:\n#{NEW_USAGE}"
    else
    else
      @soc = SOCMaker::SOCDef.new( args[0], args[1], args[2] )
      @soc = SOCMaker::SOCDef.new( args[0], args[1], args[2] )
 
      SOCMaker::lib.add_core( @soc )
 
      @soc_inst = SOCMaker::CoreInst.new( "#{args[0]}#{args[1]}" )
      #puts FMSG if @soc.load_soc( args[ 0 ] ) == nil
      #puts FMSG if @soc.load_soc( args[ 0 ] ) == nil
    end
    end
  end
  end
 
 
 
 
Line 124... Line 126...
    if args.size != 1
    if args.size != 1
      puts "only one argument is required:\nusage:\n#{OPEN_USAGE}"
      puts "only one argument is required:\nusage:\n#{OPEN_USAGE}"
    else
    else
      puts "loading #{args[0]}"
      puts "loading #{args[0]}"
      @soc = SOCMaker::from_f( args[0] )
      @soc = SOCMaker::from_f( args[0] )
 
      SOCMaker::lib.add_core( @soc )
 
      @soc_inst = SOCMaker::CoreInst.new( "#{@soc.name}#{@soc.version}" )
      #puts FMSG if @soc.load_soc( args[ 0 ] ) == nil
      #puts FMSG if @soc.load_soc( args[ 0 ] ) == nil
    end
    end
  end
  end
 
 
 
 
Line 259... Line 263...
  "
  "
  def do_save( args )
  def do_save( args )
    if args.size > 1
    if args.size > 1
      puts "zero or one argument is required:\nusage:\n#{SAVE_USAGE}"
      puts "zero or one argument is required:\nusage:\n#{SAVE_USAGE}"
    else
    else
      puts "in do_save"
 
      p args
      p args
      puts FMSG if @soc.save_yaml( args ) == nil
      puts FMSG if @soc.save_yaml( args ) == nil
    end
    end
  end
  end
 
 
Line 277... Line 280...
  "
  "
  def do_generate( args )
  def do_generate( args )
    if args.size != 0
    if args.size != 0
      puts "no arguments are required:\nusage:\n#{GENERATE_USAGE}"
      puts "no arguments are required:\nusage:\n#{GENERATE_USAGE}"
    else
    else
      @soc.gen_toplevel
      @soc_inst.gen_toplevel
      @soc.copy_files
      @soc.copy_files
    end
    end
  end
  end
 
 
 
 
Line 358... Line 361...
  #################################
  #################################
 
 
 
 
 
 
  @soc = nil
  @soc = nil
 
  @soc_inst = nil
 
 
  def initialize
  def initialize
 
 
    # appreviation map
    # appreviation map
    @appr_map = { 'n' => "new",
    @appr_map = { 'n' => "new",

powered by: WebSVN 2.1.0

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