fix CfuPlugin generation

This commit is contained in:
Dolu1990 2020-09-04 10:36:02 +02:00
parent 7dcaa0c390
commit 4c3cad97d3
2 changed files with 9 additions and 3 deletions

View File

@ -53,7 +53,13 @@ object GenSmallAndProductiveCfu extends App{
new CfuPlugin(
stageCount = 1,
allowZeroLatency = true,
// encoding = M"000000-------------------0001011",
encodings = List(
CfuPluginEncoding (
instruction = M"-------------------------0001011",
functionId = List(14 downto 12),
input2Kind = CfuPlugin.Input2Kind.RS
)
),
busParameter = CfuBusParameter(
CFU_VERSION = 0,
CFU_INTERFACE_ID_W = 0,

View File

@ -97,7 +97,7 @@ class CfuPlugin( val stageCount : Int,
assert(p.CFU_INPUTS <= 2)
assert(p.CFU_OUTPUTS == 1)
assert(p.CFU_FUNCTION_ID_W == 3)
// assert(p.CFU_FUNCTION_ID_W == 3)
var bus : CfuBus = null
var joinException : Flow[ExceptionCause] = null
@ -128,7 +128,7 @@ class CfuPlugin( val stageCount : Int,
BYPASSABLE_EXECUTE_STAGE -> Bool(stageCount == 0),
BYPASSABLE_MEMORY_STAGE -> Bool(stageCount <= 1),
RS1_USE -> True,
CFU_ENCODING -> id,
CFU_ENCODING -> U(id),
CFU_INPUT_2_KIND -> encoding.input2Kind()
)