Skip to content

Commit

Permalink
Release V1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sixshotx committed Apr 30, 2016
2 parents 62b1ef9 + 2855b55 commit ba41ac7
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 23 deletions.
4 changes: 2 additions & 2 deletions models/memory/CaffDRAM/Controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class Controller : public manifold::kernel::Component {
template<typename T>
void handle_request(int, uarch::NetworkPacket* pkt);

void print_config(std::ostream&);
void print_stats(std::ostream&);
void print_config(std::ostream&);
void print_stats(std::ostream&);

static void Set_msg_types(int mem, int credit)
{
Expand Down
12 changes: 12 additions & 0 deletions models/processor/spx/core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ void spx_core_t::tick()
// This will periodically print the stats to show the progress of simulation -- for debugging
print_stats(100000, stdout);
#endif

if (get_qsim_osd_state() == QSIM_OSD_TERMINATED) {
fprintf(stdout, "SPX core %d out of insn", core_id);
manifold::kernel::Manifold::Terminate();
}
}

void spx_core_t::print_stats(uint64_t sampling_period, FILE *LogFile)
Expand All @@ -128,6 +133,13 @@ void spx_core_t::reset_interval_stats()
pipeline->stats.interval.uop_count = 0;
}

void spx_core_t::print_stats(std::ostream& out)
{
out << "************ SPX Core " << core_id << " [node " << node_id << "] stats *************" << endl;
out << " Total clock cycles: " << (double)clock_cycle/1e6 << "M" << endl;
out << " avgIPC = " << (double)pipeline->stats.uop_count / (double) clock_cycle << endl; }


void spx_core_t::handle_cache_response(int temp, cache_request_t *cache_request)
{
pipeline->handle_cache_response(temp,cache_request);
Expand Down
3 changes: 3 additions & 0 deletions models/processor/spx/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ class spx_core_t : public manifold::kernel::Component
void turn_on();
void turn_off();

// void print_config(std::ostream&);
void print_stats(std::ostream&);

void send_qsim_proxy_request();

int node_id; // manifold node ID
Expand Down
26 changes: 17 additions & 9 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,22 @@ if [ -z "$QSIM_PREFIX" ]; then
echo "Press any key to exit..."
read inp
exit 1
else
echo "\nUsing ${bold}qsim${normal} from dir ${bold}$QSIM_PREFIX${normal}"
echo "Press any key to continue..."
read inp
fi

# install manifold-dep packages
echo "Installing dependencies ..."
echo "sudo apt-get -y install build-essentail libconfig++-dev openmpi-bin openmpi-common libopenmpi-dev"
sudo apt-get -y install build-essential libconfig++-dev openmpi-bin openmpi-common libopenmpi-dev
if hash apt-get 2>/dev/null; then
echo "Installing dependencies ..."
echo "sudo apt-get -y install build-essentail libconfig++-dev openmpi-bin openmpi-common libopenmpi-dev"
sudo apt-get -y install build-essential libconfig++-dev openmpi-bin openmpi-common libopenmpi-dev
else
echo "please refer to manifold manual for installation dependencies"
echo "Press any key to continue..."
read dump
fi

# Build manifold simulator
echo "Building manifold components ..."
Expand All @@ -34,13 +44,11 @@ echo "Downloading the benchmark ..."
cd ${MANIFOLD_DIR}/simulator/smp
mkdir -p benchmark
cd benchmark
wget -c "https://www.dropbox.com/s/8551vnwhzqt9fk6/graphbig_x64.tar.gz?dl=0" -O graphbig_x64.tgz
wget -c "https://www.dropbox.com/s/rpxgwhyr41m2oa0/graphbig_a64.tar.gz?dl=0" -O graphbig_a64.tgz
wget -c "https://www.dropbox.com/s/jslv1g1v77ndq8m/splash-2.tar.gz?dl=0" -O splash_x86.tgz
wget -c "https://github.com/gtcasl/qsim_prebuilt/releases/download/v0.1/graphBig_x86.tar.xz" -O graphbig_x86.tar.xz
wget -c "https://github.com/gtcasl/qsim_prebuilt/releases/download/v0.1/graphBig_a64.tar.xz" -O graphbig_a64.tar.xz
echo "Uncompressing the benchmark ..."
tar -xzvf graphbig_a64.tgz
tar -xzvf graphbig_x64.tgz
tar -xzvf splash_x86.tgz
tar -xf graphbig_x86.tar.xz
tar -xf graphbig_a64.tar.xz
cd ..

if [ ! -f $QSIM_PREFIX/state.64 ]; then
Expand Down
4 changes: 2 additions & 2 deletions simulator/smp/QsimProxy/smp_l1l2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ int main(int argc, char** argv)
Manifold::Run();


sysBuilder.print_stats();
sysBuilder.print_stats(cerr);


#ifdef REDIRECT_COUT
std::cout.rdbuf(cout_sbuf);
#endif

Manifold :: Finalize();
Manifold::Finalize();
}

4 changes: 2 additions & 2 deletions simulator/smp/QsimProxy/smp_llp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ int main(int argc, char** argv)
Manifold::Run();


sysBuilder.print_stats();
sysBuilder.print_stats(cerr);


#ifdef REDIRECT_COUT
std::cout.rdbuf(cout_sbuf);
#endif

Manifold :: Finalize();
Manifold::Finalize();
}

10 changes: 10 additions & 0 deletions simulator/smp/common/proc_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -565,3 +565,13 @@ void Spx_builder :: print_config(std::ostream& out)
out << " config file: " << m_CONFIG_FILE << endl;
}

void Spx_builder :: print_stats(std::ostream& out)
{
for(map<int,int>::iterator it = m_proc_id_cid_map.begin(); it != m_proc_id_cid_map.end(); ++it) {
int cid = (*it).second;
spx_core_t* proc = manifold::kernel::Component :: GetComponent<spx_core_t>(cid);
if(proc) {
proc->print_stats(out);
}
}
}
2 changes: 1 addition & 1 deletion simulator/smp/common/proc_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class Spx_builder : public ProcBuilder {
void connect_proc_qsim_proxy(QsimBuilder* qsim_builder);

void print_config(std::ostream&);
//void print_stats(std::ostream&);
void print_stats(std::ostream&);

private:
Qsim::OSDomain* m_qsim_osd;
Expand Down
12 changes: 6 additions & 6 deletions simulator/smp/common/sysBuilder_llp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -664,13 +664,13 @@ void SysBuilder_llp :: print_config(ostream& out)

//====================================================================
//====================================================================
void SysBuilder_llp :: print_stats()
void SysBuilder_llp :: print_stats(ostream& out)
{
m_proc_builder->print_stats(cout);
m_cache_builder->print_stats(cout);
m_mc_builder->print_stats(cout);
m_network_builder->print_stats(cout);
m_proc_builder->print_stats(out);
m_cache_builder->print_stats(out);
m_mc_builder->print_stats(out);
m_network_builder->print_stats(out);

Manifold :: print_stats(cout);
Manifold::print_stats(out);
}

2 changes: 1 addition & 1 deletion simulator/smp/common/sysBuilder_llp.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class SysBuilder_llp {

void pre_simulation();
void print_config(std::ostream& out);
void print_stats();
void print_stats(std::ostream& out);

libconfig::Config m_config;

Expand Down

0 comments on commit ba41ac7

Please sign in to comment.