"...resnet50_tensorflow.git" did not exist on "f3641f23b2f82cb98503bdd27d3e22077d3bf90b"
Commit f5e6109a authored by Jialin Li's avatar Jialin Li
Browse files

Merge branch 'master' of github.com:simbricks/simbricks

parents b47c95cb c132bf27
# Copyright 2021 Max Planck Institute for Software Systems, and
# National University of Singapore
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
include mk/subdir_pre.mk
bin_e1000_gem5 := $(d)e1000_gem5
OBJS := $(addprefix $(d),e1000_gem5.o i8254xGBe.o gem5/bitfield.o gem5/inet.o \
gem5/pktfifo.o)
$(bin_e1000_gem5): $(OBJS) $(lib_nicbm) $(lib_nicif)
CLEAN := $(bin_e1000_gem5) $(OBJS)
ALL := $(bin_e1000_gem5)
include mk/subdir_post.mk
#ifndef SIMS_NIC_E1000_GEM5_SUPPORT_H_
#define SIMS_NIC_E1000_GEM5_SUPPORT_H_
#include <arpa/inet.h>
#include <functional>
#include <memory>
#include <simbricks/nicbm/nicbm.h>
#define DNET_LIL_ENDIAN 42
#define DNET_BYTESEX DNET_LIL_ENDIAN
//#define DEBUG_E1000
#ifdef DEBUG_E1000
# define DPRINTF(x,y...) fprintf(stderr, #x ": " y)
#else
# define DPRINTF(x,y...) do { } while (0)
#endif
typedef uint64_t Addr;
typedef uint64_t Tick;
#define ETH_ADDR_LEN 6
class Gem5TimerEv;
class EthPacketData {
public:
unsigned length;
uint8_t *data;
EthPacketData(unsigned len) : length(0), data(new uint8_t[len]) { }
~EthPacketData() { delete[] data; }
};
typedef std::shared_ptr<EthPacketData> EthPacketPtr;
class EventFunctionWrapper : public nicbm::TimedEvent {
public:
bool sched;
std::function<void(void)> callback;
std::string _name;
EventFunctionWrapper(const std::function<void(void)> &callback,
const std::string &name)
: sched(false), callback(callback), _name(name)
{ }
virtual ~EventFunctionWrapper() = default;
bool scheduled() { return sched; }
};
static inline uint16_t htobe(uint16_t x) {
return htons(x);
}
static inline uint16_t htole(uint16_t x) {
return x;
}
void warn(const char *fmt, ...);
void panic(const char *fmt, ...);
#endif // SIMS_NIC_E1000_GEM5_SUPPORT_H_
\ No newline at end of file
...@@ -24,6 +24,7 @@ include mk/subdir_pre.mk ...@@ -24,6 +24,7 @@ include mk/subdir_pre.mk
$(eval $(call subdir,corundum)) $(eval $(call subdir,corundum))
$(eval $(call subdir,corundum_bm)) $(eval $(call subdir,corundum_bm))
$(eval $(call subdir,e1000_gem5))
$(eval $(call subdir,i40e_bm)) $(eval $(call subdir,i40e_bm))
include mk/subdir_post.mk include mk/subdir_post.mk
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