From 6acf73a40fc06b1371a8330c2ed0107cec84b36b Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Fri, 1 Oct 2021 13:05:36 +0200 Subject: [PATCH] add template to generate instruction YAML --- gen_input/templates/CORENAME_instr.yaml.gtl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 gen_input/templates/CORENAME_instr.yaml.gtl diff --git a/gen_input/templates/CORENAME_instr.yaml.gtl b/gen_input/templates/CORENAME_instr.yaml.gtl new file mode 100644 index 0000000..59fa845 --- /dev/null +++ b/gen_input/templates/CORENAME_instr.yaml.gtl @@ -0,0 +1,16 @@ +<% def getInstructionGroups() { + def instrGroups = [:] + instructions.each { + def groupName = it['instruction'].eContainer().name + if(!instrGroups.containsKey(groupName)) { + instrGroups[groupName]=[] + } + instrGroups[groupName]+=it; + } + instrGroups +}%><%getInstructionGroups().each{name, instrList -> %> +${name}: <% instrList.findAll{!it.instruction.name.startsWith("__")}.each { %> + - ${it.instruction.name} + encoding: ${it.encoding} + mask: ${it.mask}<%}}%> +