Skip to content

Commit

Permalink
Juno updates including
Browse files Browse the repository at this point in the history
- Copyright date to 2022
- StandardMem interface instead of SimpleMem
- New naming conventions
- Fix compiler warnings
  • Loading branch information
gvoskuilen committed Feb 9, 2022
1 parent c4cc9c1 commit 682af32
Show file tree
Hide file tree
Showing 115 changed files with 382 additions and 356 deletions.
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright 2009-2021 National Technology and Engineering Solutions of Sandia,
Copyright 2009-2022 National Technology and Engineering Solutions of Sandia,
LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government
retains certain rights in this software.

Expand All @@ -9,7 +9,7 @@ by National Technology and Engineering Solutions of Sandia, LLC., a wholly
owned subsidiary of Honeywell International, Inc., for the U.S. Department of
Energy's National Nuclear Security Administration under contract DE-NA0003525.

Copyright (c) 2009-2021, NTESS
Copyright (c) 2009-2022, NTESS

All rights reserved.

Expand Down
4 changes: 2 additions & 2 deletions asm/asmlocalopcodes.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013-2021 NTESS. Under the terms
// Copyright 2013-2022 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2013-2021, NTESS
// Copyright (c) 2013-2022, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
Expand Down
4 changes: 2 additions & 2 deletions asm/asmmain.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013-2021 NTESS. Under the terms
// Copyright 2013-2022 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2013-2021, NTESS
// Copyright (c) 2013-2022, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
Expand Down
6 changes: 3 additions & 3 deletions asm/asmop.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013-2021 NTESS. Under the terms
// Copyright 2013-2022 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2013-2021, NTESS
// Copyright (c) 2013-2022, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
Expand Down Expand Up @@ -83,7 +83,7 @@ class AssemblyRegisterOperand : public AssemblyOperand {
}

char regNum[JUNO_MAX_REGISTER_DIGITS];
for(int i = 1; i < std::max(static_cast<size_t>(JUNO_MAX_REGISTER_DIGITS), strlen(regst)); ++i) {
for(size_t i = 1; i < std::max(static_cast<size_t>(JUNO_MAX_REGISTER_DIGITS), strlen(regst)); ++i) {
regNum[i-1] = regst[i];
}

Expand Down
4 changes: 2 additions & 2 deletions asm/asmoptions.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013-2021 NTESS. Under the terms
// Copyright 2013-2022 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2013-2021, NTESS
// Copyright (c) 2013-2022, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
Expand Down
20 changes: 10 additions & 10 deletions asm/asmprogram.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013-2021 NTESS. Under the terms
// Copyright 2013-2022 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2013-2021, NTESS
// Copyright (c) 2013-2022, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
Expand Down Expand Up @@ -81,7 +81,7 @@ class AssemblyProgram {

int index = -1;

for( int j = 0; j < int64Literals.size(); ++j ) {
for( size_t j = 0; j < int64Literals.size(); ++j ) {
if( litVal == int64Literals[j] ) {
index = j;
break;
Expand Down Expand Up @@ -167,13 +167,13 @@ class AssemblyProgram {
fwrite( &literalSize, sizeof(literalSize), 1, binary );
fwrite( &programSize, sizeof(programSize), 1, binary );

for( int i = 0; i < int64Literals.size(); ++i ) {
for( size_t i = 0; i < int64Literals.size(); ++i ) {
fwrite( &int64Literals[i], sizeof(int64_t), 1, binary );
}

char binaryOp[4];

for( int i = 0; i < op->size(); ++i ) {
for( size_t i = 0; i < op->size(); ++i ) {
for( int j = 0; j < 4; ++j ) {
binaryOp[j] = 0;
}
Expand Down Expand Up @@ -228,7 +228,7 @@ class AssemblyProgram {
memcpy( (void*) &binaryOp[2], (void*)& zero, sizeof(zero) );
memcpy( (void*) &binaryOp[3], (void*)& zero, sizeof(zero) );
} else {
fprintf(stderr, "Unknown instruction code: %s at instruction index: %d\n",
fprintf(stderr, "Unknown instruction code: %s at instruction index: %zu\n",
curOp->getInstCode().c_str(), i);
exit(-1);
}
Expand Down Expand Up @@ -349,11 +349,11 @@ class AssemblyProgram {
}

AssemblyLiteralOperand* litOp = dynamic_cast<AssemblyLiteralOperand*>(curOp->getOperand(0));
uint64_t litVal = static_cast<uint64_t>( litOp->getLiteral() );
int64_t litVal = litOp->getLiteral();

int index = -1;

for( int i = 0; i < int64Literals.size(); ++i ) {
for( size_t i = 0; i < int64Literals.size(); ++i ) {
if(int64Literals[i] == litVal) {
index = i;
break;
Expand Down Expand Up @@ -393,11 +393,11 @@ class AssemblyProgram {
}

AssemblyLiteralOperand* litOp = dynamic_cast<AssemblyLiteralOperand*>(curOp->getOperand(1));
uint64_t litVal = static_cast<uint64_t>( litOp->getLiteral() );
int64_t litVal = litOp->getLiteral();

int index = -1;

for( int i = 0; i < int64Literals.size(); ++i ) {
for( size_t i = 0; i < int64Literals.size(); ++i ) {
if(int64Literals[i] == litVal) {
index = i;
break;
Expand Down
4 changes: 2 additions & 2 deletions asm/asmreader.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013-2021 NTESS. Under the terms
// Copyright 2013-2022 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2013-2021, NTESS
// Copyright (c) 2013-2022, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
Expand Down
4 changes: 2 additions & 2 deletions asm/asmreader.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013-2021 NTESS. Under the terms
// Copyright 2013-2022 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2013-2021, NTESS
// Copyright (c) 2013-2022, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
Expand Down
4 changes: 2 additions & 2 deletions src/custominst/junocustinst.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013-2021 NTESS. Under the terms
// Copyright 2013-2022 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2013-2021, NTESS
// Copyright (c) 2013-2022, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
Expand Down
8 changes: 4 additions & 4 deletions src/custominst/junorandextinst.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013-2021 NTESS. Under the terms
// Copyright 2013-2022 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2013-2021, NTESS
// Copyright (c) 2013-2022, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
Expand Down Expand Up @@ -32,8 +32,8 @@ JunoExternalRandInstructionHandler::JunoExternalRandInstructionHandler( Componen
randAccLink = configureLink( "genlink", "1ns", new Event::Handler<JunoExternalRandInstructionHandler>(
this, &JunoExternalRandInstructionHandler::handleGenerateResp));

statRandCalls = registerStatistic<uint64_t>("rand-calls");
statCyclesBusy = registerStatistic<uint64_t>("cycles-busy");
statRandCalls = registerStatistic<uint64_t>("rand_calls");
statCyclesBusy = registerStatistic<uint64_t>("cycles_busy");
}

JunoExternalRandInstructionHandler::~JunoExternalRandInstructionHandler() {
Expand Down
8 changes: 4 additions & 4 deletions src/custominst/junorandextinst.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013-2021 NTESS. Under the terms
// Copyright 2013-2022 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2013-2021, NTESS
// Copyright (c) 2013-2022, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
Expand Down Expand Up @@ -67,8 +67,8 @@ class JunoExternalRandInstructionHandler : public JunoCustomInstructionHandler {
)

SST_ELI_DOCUMENT_STATISTICS(
{ "rand-calls", "Calls to the RAND instruction", "calls", 1 },
{ "cycles-busy", "Cycles spent waiting for accelerator", "cycles", 1 }
{ "rand_calls", "Calls to the RAND instruction", "calls", 1 },
{ "cycles_busy", "Cycles spent waiting for accelerator", "cycles", 1 }
)

private:
Expand Down
8 changes: 4 additions & 4 deletions src/custominst/junorandinst.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013-2021 NTESS. Under the terms
// Copyright 2013-2022 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2013-2021, NTESS
// Copyright (c) 2013-2022, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
Expand Down Expand Up @@ -30,8 +30,8 @@ JunoRandInstructionHandler::JunoRandInstructionHandler( ComponentId_t id, Params
const uint64_t rngSeed = params.find<uint64_t>("seed", 101010101);
rng = new MersenneRNG( rngSeed );

statRandCalls = registerStatistic<uint64_t>("calls-to-rand");
statRandSeedCalls = registerStatistic<uint64_t>("calls-to-rseed");
statRandCalls = registerStatistic<uint64_t>("calls_to_rand");
statRandSeedCalls = registerStatistic<uint64_t>("calls_to_rseed");

cyclesLeft = 0;
}
Expand Down
8 changes: 4 additions & 4 deletions src/custominst/junorandinst.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013-2021 NTESS. Under the terms
// Copyright 2013-2022 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2013-2021, NTESS
// Copyright (c) 2013-2022, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
Expand Down Expand Up @@ -65,8 +65,8 @@ class JunoRandInstructionHandler : public JunoCustomInstructionHandler {
)

SST_ELI_DOCUMENT_STATISTICS(
{ "calls-to-rand", "Number of times the RAND instruction is called", "calls", 1 },
{ "calls-to-rseed", "Number of times the RSEED instruction is called", "calls", 1 }
{ "calls_to_rand", "Number of times the RAND instruction is called", "calls", 1 },
{ "calls_to_rseed", "Number of times the RSEED instruction is called", "calls", 1 }
)

private:
Expand Down
4 changes: 2 additions & 2 deletions src/custominst/randaccel/junogenrandev.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013-2021 NTESS. Under the terms
// Copyright 2013-2022 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2013-2021, NTESS
// Copyright (c) 2013-2022, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
Expand Down
4 changes: 2 additions & 2 deletions src/custominst/randaccel/junogenrandresp.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013-2021 NTESS. Under the terms
// Copyright 2013-2022 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2013-2021, NTESS
// Copyright (c) 2013-2022, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
Expand Down
4 changes: 2 additions & 2 deletions src/custominst/randaccel/junorandacc.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013-2021 NTESS. Under the terms
// Copyright 2013-2022 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2013-2021, NTESS
// Copyright (c) 2013-2022, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
Expand Down
4 changes: 2 additions & 2 deletions src/custominst/randaccel/junorandacc.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013-2021 NTESS. Under the terms
// Copyright 2013-2022 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2013-2021, NTESS
// Copyright (c) 2013-2022, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
Expand Down
4 changes: 2 additions & 2 deletions src/instmgr/junofixedprogmgr.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013-2021 NTESS. Under the terms
// Copyright 2013-2022 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2013-2021, NTESS
// Copyright (c) 2013-2022, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
Expand Down
4 changes: 2 additions & 2 deletions src/junoalu.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2013-2021 NTESS. Under the terms
// Copyright 2013-2022 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2013-2021, NTESS
// Copyright (c) 2013-2022, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
Expand Down
Loading

0 comments on commit 682af32

Please sign in to comment.