Appendix E. Image Filter Listings


 /*************************************************************************** * * img_hw.c - Image Convolution Hardware Processes * * Copyright (c) 2004 by Green Mountain Computing Systems, Inc. * All rights reserved. * ***************************************************************************/ #include <stdio.h> #include "co.h" #include "cosim_log.h" #include "img.h" extern void call_fpga(co_memory imgmem, co_signal start, co_signal end); void to_stream(co_signal go, co_memory imgmem, co_stream output_stream) { int16 i, j; uint32 offset, data, d0; uint32 row[IMG_WIDTH / 2]; IF_SIM(cosim_logwindow log;) IF_SIM(log = cosim_logwindow_create("to_stream");) co_signal_wait(go, &data); co_stream_open(output_stream, ...

Get Practical FPGA Programming in C now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.