updates to latest version of CoreDSL (2.0.9)

This commit is contained in:
Eyck Jentzsch 2023-06-22 07:20:19 +02:00
parent 65f2b42a4c
commit 9d4cef96a9
3 changed files with 6 additions and 6 deletions

View File

@ -39,7 +39,8 @@
<unit id="org.json" version="1.0.0.v201011060100"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="https://minres.github.io/CoreDSL/repository/2.0/2.0.3"/>
<repository location="https://minres.github.io/CoreDSL/repository/2.0/2.0.9"/>
<unit id="com.minres.coredsl.feature.source.feature.group" version="0.0.0"/>
<unit id="com.minres.coredsl.feature.feature.group" version="0.0.0"/>
</location>
</locations>

View File

@ -87,7 +87,7 @@ Core RV32I {
assertNotNull(result)
assertEquals("RV32I", result.name)
assertNull(result.superType)
assertEquals(9, result.declarations.size())
assertEquals(9, result.archStateBody.size())
assertNotNull(result.instructions)
assertEquals(5, result.instructions.size)

View File

@ -18,7 +18,6 @@ import java.util.List
import com.minres.coredsl.coreDsl.ISA
import org.json.JSONObject
import org.json.JSONArray
import com.minres.coredsl.util.BigIntegerWithRadix
import com.minres.coredsl.coreDsl.Statement
import org.eclipse.xtext.resource.XtextResource
@ -41,8 +40,8 @@ class CoreDslJsonGenerator extends AbstractGenerator {
def Boolean isHls(Instruction inst){
val instrSet = inst.eContainer as ISA;
!(inst.attributes.filter[it.type=='hls'].isEmpty &&
instrSet.commonInstructionAttributes.filter[it.type=='hls'].isEmpty)
!(inst.attributes.filter[it.attributeName=='hls'].isEmpty &&
instrSet.commonInstructionAttributes.filter[it.attributeName=='hls'].isEmpty)
}
def JSONArray compile(CoreDef coreDef) {
val insts = coreDef.allInstr
@ -104,7 +103,7 @@ class CoreDslJsonGenerator extends AbstractGenerator {
def dispatch asString(BitField i) '''«i.name»[«i.startIndex.value.intValue»:«i.endIndex.value.intValue»]'''
def dispatch asString(BitValue i) {
(i.value as BigIntegerWithRadix).toCString(2)
i.value.toString(2)
}