| // Copyright 2023 Google LLC | |
| // | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // https://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Unless required by applicable law or agreed to in writing, software | |
| // distributed under the License is distributed on an "AS IS" BASIS, | |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| // See the License for the specific language governing permissions and | |
| // limitations under the License. | |
| decoder Vliw16 { | |
| namespace sim::vliw16; | |
| opcode_enum = "isa16::OpcodeEnum"; | |
| G16; | |
| }; | |
| decoder Vliw24 { | |
| namespace sim::vliw24; | |
| opcode_enum = "isa24::OpcodeEnum"; | |
| G24; | |
| }; | |
| decoder Vliw32 { | |
| namespace sim::vliw32; | |
| opcode_enum = "isa32::OpcodeEnum"; | |
| G32; | |
| }; | |
| format Inst32Format[32] { | |
| fields: | |
| unsigned bits[25]; | |
| unsigned opcode[7]; | |
| }; | |
| format Inst24Format[24] { | |
| fields: | |
| unsigned bits[24]; | |
| }; | |
| format Inst16Format[16] { | |
| fields: | |
| unsigned bits[16]; | |
| }; | |
| format vliw[256] { | |
| fields: | |
| format Inst32Format i0[4]; | |
| format Inst24Format i1[4]; | |
| format Inst16Format i2[2]; | |
| }; | |
| instruction group G16[16] : Inst16Format { | |
| }; | |
| instruction group G24[24] : Inst24Format { | |
| }; | |
| instruction group G32[32] : Inst32Format { | |
| }; |