Skip to content

boolean operations instead of c-style tests? #12

@ntmoore

Description

@ntmoore

In the file https://github.com/ntmoore/phys332_fall21/blob/main/11_4_vary_brightness.v

Lines 23, 26, 30 are written a C/Java style == logical tests. Could we also write these as boolean operations? eg

if(ctr==8'b0000) begin  

What about something like
if( ~ctr[3] & ~ctr[3] & ~ctr[3] & ~ctr[3] )
???

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions