Skip to content

Figure out how to skip copyright header in verilog output in rendered Sphinx docs #47

@mithro

Description

@mithro
Collaborator

It would be nice to automatically skip the copyright header when displaying the verilog output into the Sphinx documentation.

Currently a verilog file like this;

/*
 * Copyright (C) 2020  The SymbiFlow Authors.
 *
 * Use of this source code is governed by a ISC-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/ISC
 *
 * SPDX-License-Identifier:	ISC
 */

/*
 * `input wire a` should be detected as a clock because of the `(* CLOCK *)`
 * attribute.
 */
(* whitebox *)
module BLOCK(a, b, o);
	(* CLOCK *)
	input wire a;
	input wire b;
	output wire o;
endmodule

You end up with the output which looks like this;
Screenshot from 2020-04-16 10-42-23

This is probably an issue + test needed in https://github.com/SymbiFlow/sphinxcontrib-verilog-diagrams

Activity

daniellimws

daniellimws commented on Apr 17, 2020

@daniellimws
Collaborator

I managed to hide it with the :start-after: option of literalinclude as seen in 646d3d2.

mithro

mithro commented on Apr 23, 2020

@mithro
CollaboratorAuthor

@daniellimws - It would be nice if there was a literalinclude like directive that automatically detected the copyright header in the file and added the :start-after: bit automatically. This could probably be done via a similar manner to https://github.com/mithro/sphinxcontrib-session

GitHub
Sphinx extension for displaying console and other sessions. - mithro/sphinxcontrib-session
daniellimws

daniellimws commented on Apr 23, 2020

@daniellimws
Collaborator

@mithro Where would be a good place to implement this directive? Shall I add this feature into https://github.com/mithro/sphinxcontrib-session?

GitHub
Sphinx extension for displaying console and other sessions. - mithro/sphinxcontrib-session
mithro

mithro commented on Apr 23, 2020

@mithro
CollaboratorAuthor

@daniellimws I think as part of sphinxcontrib-verilog-diagrams probably makes some sense? Otherwise maybe we need a new sphinxcontrib-fancyinclude type project?

daniellimws

daniellimws commented on Apr 23, 2020

@daniellimws
Collaborator

Alright sounds good, I'll add it to sphinxcontrib-verilog-diagrams.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Participants

    @mithro@daniellimws

    Issue actions

      Figure out how to skip copyright header in verilog output in rendered Sphinx docs · Issue #47 · chipsalliance/f4pga-v2x