aboutsummaryrefslogtreecommitdiff
path: root/tests/simple_mem/many.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/simple_mem/many.c')
-rw-r--r--tests/simple_mem/many.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/simple_mem/many.c b/tests/simple_mem/many.c
new file mode 100644
index 0000000..6754ebb
--- /dev/null
+++ b/tests/simple_mem/many.c
@@ -0,0 +1,28 @@
+#include <assert.h>
+
+#include <gran/root.h>
+#include <gran/clock_domain.h>
+#include <gran/components/mem/simple_mem.h>
+
+#include "traffic_gen.h"
+
+int main()
+{
+ const size_t size = 100000;
+ struct component *simple_mem1 = create_simple_mem(size);
+ struct component *simple_mem2 = create_simple_mem(size);
+
+ struct component *traffic_gen1 = create_traffic_gen(simple_mem1, 0, size);
+ struct component *traffic_gen2 = create_traffic_gen(simple_mem2, 0, size);
+
+ struct clock_domain *clk = create_clock_domain(NS(1));
+ clock_domain_add(clk, traffic_gen1);
+ clock_domain_add(clk, traffic_gen2);
+
+ struct gran_root *root = create_root();
+ root_add_clock(root, clk);
+
+ assert(root_run(root) == OK);
+
+ destroy_root(root);
+}