OpenCores
URL https://opencores.org/ocsvn/linkruncca/linkruncca/trunk

Subversion Repositories linkruncca

[/] [linkruncca/] [trunk/] [src/] [holes_filler.v] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 jaytang
/**************************************
2
Author: J.W Tang
3
Email: jaytang1987@hotmail.com
4
Module: holes_filler
5
Date: 2016-04-24
6
 
7
Copyright (C) 2016 J.W. Tang
8
----------------------------
9
This file is part of LinkRunCCA.
10
 
11
LinkRunCCA is free software: you can redistribute it and/or modify
12
it under the terms of the GNU Lesser General Public License as
13
published by the Free Software Foundation, either version 3 of
14
the License, or (at your option) any later version.
15
 
16
LinkRunCCA is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
GNU Lesser General Public License for more details.
20
 
21
You should have received a copy of the GNU Lesser General Public License
22
along with LinkRunCCA. If not, see <http://www.gnu.org/licenses/>.
23
 
24
By using LinkRunCCA in any or associated publication,
25
you agree to cite it as:
26
Tang, J. W., et al. "A linked list run-length-based single-pass
27
connected component analysis for real-time embedded hardware."
28
Journal of Real-Time Image Processing: 1-19. 2016.
29
doi:10.1007/s11554-016-0590-2.
30
 
31
***************************************/
32
 
33 2 jaytang
module holes_filler(clk,datavalid,pix_in_current,pix_in_previous,left,pix_out);
34
 
35
input clk,datavalid,pix_in_current,pix_in_previous;
36
output reg left;
37
output pix_out;
38
 
39
reg top,x,right;
40
 
41
 
42
//window
43
always@(posedge clk)
44
        if(datavalid)begin
45
                top<=pix_in_previous;
46
                left<=x;x<=right;right<=pix_in_current;
47
        end
48
 
49
assign pix_out=(top&(left|right))?1'd1:x;
50
 
51
 
52
endmodule

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.