updates to latest version of CoreDSL (2.0.9)
This commit is contained in:
parent
65f2b42a4c
commit
9d4cef96a9
@ -39,7 +39,8 @@
|
|||||||
<unit id="org.json" version="1.0.0.v201011060100"/>
|
<unit id="org.json" version="1.0.0.v201011060100"/>
|
||||||
</location>
|
</location>
|
||||||
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
|
<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"/>
|
<unit id="com.minres.coredsl.feature.feature.group" version="0.0.0"/>
|
||||||
</location>
|
</location>
|
||||||
</locations>
|
</locations>
|
||||||
|
@ -87,7 +87,7 @@ Core RV32I {
|
|||||||
assertNotNull(result)
|
assertNotNull(result)
|
||||||
assertEquals("RV32I", result.name)
|
assertEquals("RV32I", result.name)
|
||||||
assertNull(result.superType)
|
assertNull(result.superType)
|
||||||
assertEquals(9, result.declarations.size())
|
assertEquals(9, result.archStateBody.size())
|
||||||
assertNotNull(result.instructions)
|
assertNotNull(result.instructions)
|
||||||
|
|
||||||
assertEquals(5, result.instructions.size)
|
assertEquals(5, result.instructions.size)
|
||||||
|
@ -18,7 +18,6 @@ import java.util.List
|
|||||||
import com.minres.coredsl.coreDsl.ISA
|
import com.minres.coredsl.coreDsl.ISA
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
import org.json.JSONArray
|
import org.json.JSONArray
|
||||||
import com.minres.coredsl.util.BigIntegerWithRadix
|
|
||||||
import com.minres.coredsl.coreDsl.Statement
|
import com.minres.coredsl.coreDsl.Statement
|
||||||
import org.eclipse.xtext.resource.XtextResource
|
import org.eclipse.xtext.resource.XtextResource
|
||||||
|
|
||||||
@ -41,8 +40,8 @@ class CoreDslJsonGenerator extends AbstractGenerator {
|
|||||||
|
|
||||||
def Boolean isHls(Instruction inst){
|
def Boolean isHls(Instruction inst){
|
||||||
val instrSet = inst.eContainer as ISA;
|
val instrSet = inst.eContainer as ISA;
|
||||||
!(inst.attributes.filter[it.type=='hls'].isEmpty &&
|
!(inst.attributes.filter[it.attributeName=='hls'].isEmpty &&
|
||||||
instrSet.commonInstructionAttributes.filter[it.type=='hls'].isEmpty)
|
instrSet.commonInstructionAttributes.filter[it.attributeName=='hls'].isEmpty)
|
||||||
}
|
}
|
||||||
def JSONArray compile(CoreDef coreDef) {
|
def JSONArray compile(CoreDef coreDef) {
|
||||||
val insts = coreDef.allInstr
|
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(BitField i) '''«i.name»[«i.startIndex.value.intValue»:«i.endIndex.value.intValue»]'''
|
||||||
|
|
||||||
def dispatch asString(BitValue i) {
|
def dispatch asString(BitValue i) {
|
||||||
(i.value as BigIntegerWithRadix).toCString(2)
|
i.value.toString(2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user