blob: 6aeb5b632ea6e2deaa7b3d01d908da9e37b6d7aa (
plain) (
blame)
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
|
#include <assert.h>
#include <gran/root.h>
#include <gran/mem/ideal_alloc.h>
#include "testbench.h"
int main()
{
struct component *traffic_gen = create_testbench();
struct component *ideal_alloc = create_ideal_alloc(1);
ideal_alloc_connect(ideal_alloc, traffic_gen);
testbench_connect(traffic_gen, ideal_alloc);
struct clock_domain *clk = create_clock_domain(NS(1));
clock_domain_add(clk, traffic_gen);
clock_domain_add(clk, ideal_alloc);
struct gran_root *root = create_root();
root_add_clock(root, clk);
assert(root_run(root) == OK);
destroy_root(root);
}
|