Created
May 4, 2019 06:33
test bench for blink_led.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Test bench for blink_led.cpp | |
#include <stdio.h> | |
#include <string.h> | |
#include <ap_int.h> | |
void blink_led(ap_uint<1> i_led_switch, ap_uint<4> *o_led); | |
int main(){ | |
using namespace std; | |
ap_uint<1> i_led_switch; | |
ap_uint<4> o_led; | |
i_led_switch = 1; | |
blink_led(i_led_switch, &o_led); | |
cout << "o_led = " << o_led <<endl; | |
i_led_switch = 0; | |
blink_led(i_led_switch, &o_led); | |
cout << "o_led = " << o_led <<endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment