Project

General

Profile

Actions

Bug #5675

closed

Processing of wrong test model

Added by Mikhail Chupilko about 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
High
Assignee:
Andrei Tatarnikov
Category:
-
Target version:
Start date:
03/03/2015
Due date:
% Done:

30%

Estimated time:
Detected in build:
2.1.4-beta-150219
Platform:
Published in build:
2.2.9

Description

If one uses test templates for not-yet-compiled microprocessor model or incorrect model (say, different), it will result in the following output. I guess, the robustness property requires a bit more appropriate output.

NameError: cannot load Java class ru.ispras.microtesk.model.minimips.Model
         for_name at org/jruby/javasupport/JavaClass.java:1227
  get_proxy_class at org/jruby/javasupport/JavaUtilities.java:34
      java_import at file:/C:/work/microtesk-2.1.4-beta-150219/lib/jars/jruby.jar!/jruby/java/core_ext/object.rb:26
              map at org/jruby/RubyArray.java:2361
      java_import at file:/C:/work/microtesk-2.1.4-beta-150219/lib/jars/jruby.jar!/jruby/java/core_ext/object.rb:22
     create_model at C:\work\microtesk-2.1.4-beta-150219/lib/ruby/microtesk.rb:90
             main at C:\work\microtesk-2.1.4-beta-150219/lib/ruby/microtesk.rb:32
           (root) at C:\work\microtesk-2.1.4-beta-150219/lib/ruby/microtesk.rb:111

NoMethodError: undefined method `addi' for #<EuclidTemplate:0x62db0521>
  method_missing at org/jruby/RubyBasicObject.java:1670
  method_missing at C:/work/microtesk-2.1.4-beta-150219/lib/ruby/template.rb:111
             run at C:/work/microtesk-2.1.4-beta-150219/arch/minimips/templates/euclid.rb:40
        generate at C:/work/microtesk-2.1.4-beta-150219/lib/ruby/template.rb:364
            main at C:\work\microtesk-2.1.4-beta-150219/lib/ruby/microtesk.rb:48
            each at org/jruby/RubyHash.java:1257
            main at C:\work\microtesk-2.1.4-beta-150219/lib/ruby/microtesk.rb:43
          (root) at C:\work\microtesk-2.1.4-beta-150219/lib/ruby/microtesk.rb:111
Actions #1

Updated by Alexander Kamkin about 9 years ago

  • Subject changed from Processing of wrong test model to [translator] Processing of wrong test model
  • Priority changed from Normal to High
  • Target version set to 2.1
Actions #2

Updated by Alexander Kamkin about 9 years ago

  • Subject changed from [translator] Processing of wrong test model to [template] Processing of wrong test model
Actions #3

Updated by Mikhail Chupilko about 9 years ago

If INDEX is not defined in the following definition of mode, it will result in hardly understandable exception.

mode REG (i : INDEX) = GPR[i]
  syntax = format("$%d", i)
  image  = format("%s", i)

java.lang.IllegalArgumentException
    at ru.ispras.microtesk.translator.antlrex.ParserEx.reportError(Unknown Source)
    at ru.ispras.microtesk.translator.simnml.grammar.SimnMLParser_CommonParser.typeExpr(Unknown Source)
    at ru.ispras.microtesk.translator.simnml.grammar.SimnMLParser.typeExpr(Unknown Source)
    at ru.ispras.microtesk.translator.simnml.grammar.SimnMLParser.argType(Unknown Source)
    at ru.ispras.microtesk.translator.simnml.grammar.SimnMLParser.argDef(Unknown Source)
    at ru.ispras.microtesk.translator.simnml.grammar.SimnMLParser.andRule(Unknown Source)
    at ru.ispras.microtesk.translator.simnml.grammar.SimnMLParser.modeSpecPart(Unknown Source)
    at ru.ispras.microtesk.translator.simnml.grammar.SimnMLParser.modeDef(Unknown Source)
    at ru.ispras.microtesk.translator.simnml.grammar.SimnMLParser.procSpec(Unknown Source)
    at ru.ispras.microtesk.translator.simnml.grammar.SimnMLParser.startRule(Unknown Source)
    at ru.ispras.microtesk.translator.simnml.SimnMLAnalyzer.startParserAndWalker(Unknown Source)
    at ru.ispras.microtesk.translator.simnml.SimnMLAnalyzer.start(Unknown Source)
    at ru.ispras.microtesk.translator.simnml.SimnMLAnalyzer.start(Unknown Source)
    at ru.ispras.microtesk.MicroTESK.main(Unknown Source)

Actions #4

Updated by Mikhail Chupilko about 9 years ago

reg GPR [10, DWORD]
reg ZR [DWORD] alias = GPR[31]

BUILD SUCCESSFUL
Actions #5

Updated by Alexander Kamkin about 9 years ago

  • Subject changed from [template] Processing of wrong test model to Processing of wrong test model
  • Category set to 40

The issue also relates to Template Processor.

Actions #6

Updated by Andrei Tatarnikov about 9 years ago

  • % Done changed from 0 to 30

r3278 - Better handling of wrong model names:

sh dist/bin/generate.sh xxx src/main/arch/minimips/templates/int_sqrt4.rb
Home: /home/andrewt/Documents/ISPRAS/src/microtesk/trunk/microtesk/dist
Current directory: /home/andrewt/Documents/ISPRAS/src/microtesk/trunk/microtesk
Creating the xxx model object (ru.ispras.microtesk.model.xxx.Model)...
Error: Failed to load the xxx model.
Actions #7

Updated by Alexander Kamkin about 9 years ago

  • Target version changed from 2.1 to 2.2
Actions #8

Updated by Andrei Tatarnikov over 8 years ago

reg GPR [10, DWORD]
reg ZR [DWORD] alias = GPR31

BUILD SUCCESSFUL

A check is added in r4359.

Actions #9

Updated by Andrei Tatarnikov over 8 years ago

  • Status changed from New to Resolved
Actions #10

Updated by Alexander Kamkin over 8 years ago

  • Status changed from Resolved to Closed
  • Published in build set to 2.2.9
Actions

Also available in: Atom PDF