change fifo source and finish testbench file for isp

This commit is contained in:
SikongJueluo
2024-05-16 17:15:25 +08:00
parent 21c763f54f
commit 74425d1c28
13 changed files with 961 additions and 511 deletions

View File

@@ -65,6 +65,9 @@ SC_MODULE (TB_ISP) {
data_out[1].write(image[( pos_y + 1 ) * IM_WIDTH + pos_x]);
data_out[2].write(image[( pos_y + 2 ) * IM_WIDTH + pos_x]);
wait(1);
data_en.write(0);
if (pos_x++ >= IM_WIDTH) {
pos_x = 0;
pos_y++;
@@ -101,7 +104,7 @@ int sc_main(int argc, char* argv[]) {
// Open image
ifstream in_image;
ofstream out_image;
in_image.open("./Demosaic/sim/transform/test.bin", ios::in | ios::binary);
in_image.open("../Demosaic/sim/transform/test.bin", ios::in | ios::binary);
out_image.open("./out.bin", ios::out | ios::binary);
if (!in_image.is_open()) {
cout << "Open image fail" << endl;
@@ -113,6 +116,7 @@ int sc_main(int argc, char* argv[]) {
// Read image
// uint8_t buf[IM_SIZE * 2] = {0};
auto buf = make_unique<uint8_t[]>(2 * IM_SIZE);
// vector<vector<uint8_t>> buf(IM_HEIGHT, vector<uint8_t>(IM_WIDTH, 0));
in_image.read((char*)buf.get(), IM_SIZE * 2);
in_image.close();
// Reshape data