Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 6158c24b authored by Davide Pala's avatar Davide Pala

Changed begin_signature and end_signature type to unsiged int

parent c878f0b9
Pipeline #203837 passed with stages
in 5 minutes and 35 seconds
......@@ -9,7 +9,7 @@ class BasicSimulator : public Simulator {
unsigned heapAddress;
// Signature address when doing compliance tests
ac_int<32, false>*begin_signature, *end_signature;
unsigned int begin_signature, end_signature;
ac_int<32, false>*im, *dm;
......
......@@ -45,8 +45,6 @@ BasicSimulator::BasicSimulator(const char* binaryFile, std::vector<std::string>
traceFile = fopen(tFile, "wb");
if(sFile)
signatureFile = fopen(sFile, "wb");
begin_signature = new ac_int<32, false>;
end_signature = new ac_int<32, false>;
//****************************************************************************
// Populate memory using ELF file
......@@ -95,9 +93,9 @@ BasicSimulator::BasicSimulator(const char* binaryFile, std::vector<std::string>
core.pc = symbol->offset;
if (signatureFile != NULL){
if (strcmp(name, "begin_signature") == 0)
*begin_signature = symbol->offset;
begin_signature = symbol->offset;
else if (strcmp(name, "end_signature") == 0)
*end_signature = symbol->offset;
end_signature = symbol->offset;
}
}
free(sectionContent);
......@@ -173,14 +171,14 @@ void BasicSimulator::printEnd()
ac_int<32, false> wordNumber;
ac_int<32, false> addr_offset = 4;
ac_int<32, false> begin_offset = ((*begin_signature)%4); // correct address alignement
const auto begin_offset = ((begin_signature)%4); // correct address alignement
if(DEBUG){
printf("BEGIN/END_SIGNATURE: %x/%x (%x)", (unsigned int)(*begin_signature), (unsigned int)(*end_signature), (unsigned int)begin_offset);
printf("BEGIN/END_SIGNATURE: %x/%x (%x)", begin_signature, end_signature, begin_offset);
}
//memory read
for (wordNumber = *begin_signature - begin_offset; wordNumber < *end_signature - begin_offset; wordNumber+=addr_offset)
for (wordNumber = begin_signature - begin_offset; wordNumber < end_signature - begin_offset; wordNumber+=addr_offset)
{
fprintf(signatureFile, "%08x\n", (unsigned int)this->ldw(wordNumber));
}
......
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