aboutsummaryrefslogtreecommitdiff
path: root/riscv/htif.h
blob: 4e1025e7b5e94e4986475fc9c7c79cd1113fad41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// See LICENSE for license details.

#ifndef _HTIF_H
#define _HTIF_H

#include <fesvr/htif_pthread.h>

class sim_t;
struct packet;

// this class implements the host-target interface for program loading, etc.
// a simpler implementation would implement the high-level interface
// (read/write cr, read/write chunk) directly, but we implement the lower-
// level serialized interface to be more similar to real target machines.

class htif_isasim_t : public htif_pthread_t
{
public:
  htif_isasim_t(sim_t* _sim, const std::vector<std::string>& args);
  bool tick();
  bool done();

private:
  sim_t* sim;
  bool reset;
  uint8_t seqno;

  void tick_once();
};

#endif