Commit 2e11bfbf authored by ROKICKI Simon's avatar ROKICKI Simon
Browse files

Add file headers for all files

parent c57ed8e4
Pipeline #237631 passed with stages
in 18 minutes and 19 seconds
/** Copyright 2021 INRIA, Université de Rennes 1 and ENS Rennes
*
* 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
* http://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.
*/
#ifndef __BASIC_SIMULATOR_H__
#define __BASIC_SIMULATOR_H__
......@@ -13,7 +28,7 @@ class BasicSimulator : public Simulator {
// Signature address when doing compliance tests
unsigned int begin_signature, end_signature;
std::vector<ac_int<32, false> > mem;
FILE* inputFile;
......@@ -22,7 +37,7 @@ class BasicSimulator : public Simulator {
FILE* signatureFile;
public:
BasicSimulator(std::string binaryFile, std::vector<std::string>,
BasicSimulator(std::string binaryFile, std::vector<std::string>,
std::string inFile, std::string outFile,
std::string tFile, std::string sFile);
~BasicSimulator();
......
/*
* cacheMemory.h
*
* Created on: 15 févr. 2019
* Author: simon
*/
/** Copyright 2021 INRIA, Université de Rennes 1 and ENS Rennes
*
* 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
* http://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.
*/
#ifndef INCLUDE_CACHEMEMORY_H_
#define INCLUDE_CACHEMEMORY_H_
......@@ -124,7 +132,7 @@ public:
ac_int<1, false> valid2 = dataValid[place][1];
ac_int<1, false> valid3 = dataValid[place][2];
ac_int<1, false> valid4 = dataValid[place][3];
ac_int<16, false> age1 = age[place][0];
ac_int<16, false> age2 = age[place][1];
......@@ -135,7 +143,7 @@ public:
ac_int<1, false> dirty2 = dirtyBit[place][1];
ac_int<1, false> dirty3 = dirtyBit[place][2];
ac_int<1, false> dirty4 = dirtyBit[place][3];
if (cacheState == 0) {
numberAccess++;
......
/** Copyright 2021 INRIA, Université de Rennes 1 and ENS Rennes
*
* 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
* http://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.
*/
#ifndef __CORE_H__
#define __CORE_H__
......
/** Copyright 2021 INRIA, Université de Rennes 1 and ENS Rennes
*
* 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
* http://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.
*/
#ifndef __ELFFILE
#define __ELFFILE
......
/** Copyright 2021 INRIA, Université de Rennes 1 and ENS Rennes
*
* 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
* http://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.
*/
template <int x> struct log2const {
enum { value = 1 + log2const<x / 2>::value };
};
......
/** Copyright 2021 INRIA, Université de Rennes 1 and ENS Rennes
*
* 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
* http://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.
*/
#ifndef __MEMORY_INTERFACE_H__
#define __MEMORY_INTERFACE_H__
......@@ -24,7 +39,7 @@ public:
IncompleteMemory(ac_int<32, false>* arg) { data = arg; }
void process(ac_int<32, false> addr, memMask mask, memOpType opType, ac_int<INTERFACE_SIZE * 8, false> dataIn,
ac_int<INTERFACE_SIZE * 8, false>& dataOut, bool& waitOut)
{
{
// Incomplete memory only works for 32 bits
assert(INTERFACE_SIZE == 4);
......
/** Copyright 2021 INRIA, Université de Rennes 1 and ENS Rennes
*
* 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
* http://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.
*/
#ifndef PIPELINE_REGISTERS_H_
#define PIPELINE_REGISTERS_H_
......
/** Copyright 2021 INRIA, Université de Rennes 1 and ENS Rennes
*
* 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
* http://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.
*/
/*
* riscvISA.h
*
* Created on: 2 déc. 2016
* Author: simon
*/
#ifndef INCLUDES_ISA_RISCVISA_H_
#define INCLUDES_ISA_RISCVISA_H_
......
/** Copyright 2021 INRIA, Université de Rennes 1 and ENS Rennes
*
* 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
* http://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.
*/
#ifndef __SIMULATOR_H__
#define __SIMULATOR_H__
......
This diff is collapsed.
/*
* Idea of the file : open and run a test file
* The test file is organized as a set of line, each line is :
* name; instr; numberCycles; [initialRegs[32],]; initialPC; (address, data);
* finalRegs[32]; finalPC; (address, data); | initial state |
* final state |
*/
/** Copyright 2021 INRIA, Université de Rennes 1 and ENS Rennes
*
* 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
* http://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.
*/
#include <fstream>
#include <iostream>
......
/** Copyright 2021 INRIA, Université de Rennes 1 and ENS Rennes
*
* 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
* http://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.
*/
#include <errno.h>
#include <fcntl.h>
#include <cstdio>
......
/** Copyright 2021 INRIA, Université de Rennes 1 and ENS Rennes
*
* 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
* http://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.
*/
#include "ac_int.h"
#include "cacheMemory.h"
#include "core.h"
......@@ -592,12 +607,12 @@ void doCycle(struct Core& core, // Core containing all values
mask = WORD;
break;
}
memOpType opType = (!core.stallSignals[STALL_MEMORY] && !localStall && memtoWB_temp.we && !core.stallIm && memtoWB_temp.isLoad) ? LOAD
memOpType opType = (!core.stallSignals[STALL_MEMORY] && !localStall && memtoWB_temp.we && !core.stallIm && memtoWB_temp.isLoad) ? LOAD
: (!core.stallSignals[STALL_MEMORY] && !localStall && memtoWB_temp.we && !core.stallIm && memtoWB_temp.isStore ? STORE : NONE);
core.dm->process(memtoWB_temp.address, mask, opType, memtoWB_temp.valueToWrite, memtoWB_temp.result, core.stallDm);
// commit the changes to the pipeline register
if (!core.stallSignals[STALL_FETCH] && !localStall && !core.stallIm && !core.stallDm) {
core.ftoDC = ftoDC_temp;
......
/** Copyright 2021 INRIA, Université de Rennes 1 and ENS Rennes
*
* 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
* http://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.
*/
#include <cstdio>
#include <cstdlib>
#include <fstream>
......
/** Copyright 2021 INRIA, Université de Rennes 1 and ENS Rennes
*
* 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
* http://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.
*/
#include <string>
#include <vector>
......
/** Copyright 2021 INRIA, Université de Rennes 1 and ENS Rennes
*
* 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
* http://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.
*/
#include <sstream>
#include <string>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment