updates to latest version of CoreDSL (2.0.9)

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

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)
}